* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', sans-serif;
  background: #F0F4FF;
  color: #1E293B;
  min-height: 100vh;
}

.screen { display: none; }
.screen.active { display: block; }

/* ===== Header ===== */
.header {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: white;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(79,70,229,0.3);
}
.header-titles { text-align: left; }
.header h1 { font-size: 18px; font-weight: 700; letter-spacing: 0.02em; }
.header p { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.header-btns { display: flex; gap: 8px; }
.icon-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 50px; height: 50px;
  border-radius: 10px;
  font-size: 17px;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.icon-btn:hover { background: rgba(255,255,255,0.3); }
.icon-btn-icon { font-size: 18px; line-height: 1; }
.icon-btn-label { font-size: 9px; font-weight: 700; line-height: 1; opacity: 0.9; }

/* ===== Container ===== */
.container { max-width: 640px; margin: 0 auto; padding: 20px 16px 40px; }

/* ===== Buttons ===== */
.btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
}
.btn-primary { background: #4F46E5; color: white; }
.btn-primary:hover { background: #4338CA; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(79,70,229,0.35); }
.btn-primary:disabled { background: #A5B4FC; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary { background: #E2E8F0; color: #475569; }
.btn-secondary:hover { background: #CBD5E1; }
.btn-ghost {
  background: white; color: #4F46E5;
  border: 2px solid #C7D2FE;
}
.btn-ghost:hover { background: #EEF2FF; }

/* ===== Home ===== */
.home-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.home-card h2 { font-size: 16px; font-weight: 700; color: #4F46E5; margin-bottom: 4px; }
.home-card .card-desc { font-size: 13px; color: #64748B; line-height: 1.6; margin-bottom: 12px; }

.resume-banner {
  background: linear-gradient(135deg, #F5F3FF, #EEF2FF);
  border: 1px solid #C7D2FE;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.resume-banner .resume-info { font-size: 13px; color: #4F46E5; font-weight: 600; line-height: 1.5; }
.resume-banner button {
  flex-shrink: 0;
  background: #4F46E5; color: white; border: none;
  border-radius: 8px; padding: 8px 16px;
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
}

.dropzone {
  border: 2px dashed #C7D2FE;
  border-radius: 12px;
  background: #F8FAFF;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 12px;
}
.dropzone:hover, .dropzone.dragover { border-color: #4F46E5; background: #EEF2FF; }
.dropzone .dz-icon { font-size: 28px; margin-bottom: 6px; }
.dropzone .dz-main { font-size: 14px; font-weight: 600; color: #4F46E5; }
.dropzone .dz-sub { font-size: 12px; color: #94A3B8; margin-top: 4px; }
.dropzone .dz-file { font-size: 13px; color: #15803D; font-weight: 600; margin-top: 6px; }

.textarea-wrapper {
  background: white;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
  margin-bottom: 12px;
}
.textarea-wrapper:focus-within { border-color: #4F46E5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
textarea {
  width: 100%;
  min-height: 140px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.7;
  border: none;
  outline: none;
  resize: vertical;
  font-family: inherit;
  color: #1E293B;
}
textarea::placeholder { color: #94A3B8; }

.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.option-row label { font-size: 13px; color: #475569; font-weight: 600; }
.seg-group { display: inline-flex; background: #E2E8F0; border-radius: 9px; padding: 3px; }
.seg-btn {
  border: none; background: transparent;
  padding: 6px 14px; border-radius: 7px;
  font-size: 13px; font-weight: 600; color: #64748B;
  cursor: pointer; font-family: inherit; transition: all 0.12s;
}
.seg-btn.active { background: white; color: #4F46E5; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

.sample-btn {
  background: none; border: none; color: #4F46E5;
  font-size: 13px; cursor: pointer; text-decoration: underline;
  margin-bottom: 12px; font-family: inherit;
}

/* ===== Progress ===== */
.progress-label {
  display: flex; justify-content: space-between;
  font-size: 13px; color: #64748B; font-weight: 600; margin-bottom: 6px;
}
.progress-wrap {
  background: #E2E8F0; border-radius: 999px; height: 8px;
  overflow: hidden; margin-bottom: 20px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(to right, #4F46E5, #7C3AED);
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* ===== List Screen ===== */
.list-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.list-top h2 { font-size: 18px; font-weight: 700; }
.list-top button {
  background: none; border: 1px solid #E2E8F0; border-radius: 8px;
  padding: 6px 12px; font-size: 13px; color: #475569;
  cursor: pointer; font-family: inherit;
}
.list-top button:hover { background: #F8FAFC; border-color: #CBD5E1; }

.para-block {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.para-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  background: #F8FAFC;
  border-bottom: 1px solid #F1F5F9;
}
.para-head:hover { background: #F1F5F9; }
.para-title { flex: 1; font-size: 14px; font-weight: 700; color: #334155; }
.para-meta { font-size: 12px; color: #94A3B8; }
.para-toggle { font-size: 12px; color: #94A3B8; transition: transform 0.2s; }
.para-block.open .para-toggle { transform: rotate(90deg); }
.para-body { display: none; padding: 10px; }
.para-block.open .para-body { display: block; }

.para-run-btn {
  display: block; width: 100%;
  margin-top: 8px;
  padding: 10px;
  background: #F5F3FF; color: #7C3AED;
  border: 1px solid #DDD6FE; border-radius: 9px;
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.para-run-btn:hover { background: #7C3AED; color: white; }

.chunks-grid { display: grid; gap: 8px; }

.chunk-card {
  background: white;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.chunk-card:hover { border-color: #4F46E5; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,0.1); }
.chunk-card.done { border-color: #10B981; background: #F0FDF4; }

.chunk-num {
  min-width: 28px; height: 28px; border-radius: 50%;
  background: #EEF2FF; color: #4F46E5;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chunk-card.done .chunk-num { background: #10B981; color: white; }

.chunk-preview { flex: 1; }
.chunk-preview-en { font-size: 14px; color: #1E293B; line-height: 1.5; }

.chunk-score-badge {
  font-size: 13px; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; white-space: nowrap; flex-shrink: 0;
}
.badge-great { background: #DCFCE7; color: #15803D; }
.badge-ok    { background: #FEF9C3; color: #A16207; }
.badge-low   { background: #FEE2E2; color: #B91C1C; }

.btn-full-mode {
  display: block; width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #7C3AED, #4F46E5);
  color: white; border: none; border-radius: 10px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  margin-bottom: 16px; font-family: inherit;
  transition: all 0.18s;
}
.btn-full-mode:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(79,70,229,0.35); }

.btn-review-mode {
  display: block; width: 100%;
  padding: 12px;
  background: white; color: #EA580C;
  border: 2px solid #FED7AA; border-radius: 10px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  margin-bottom: 16px; font-family: inherit;
}
.btn-review-mode:hover { background: #FFF7ED; }

/* ===== 翌日復習バナー ===== */
.review-day-banner {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 1px solid #F59E0B; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 14px;
}
.review-day-icon { font-size: 22px; flex-shrink: 0; }
.review-day-text { flex: 1; }
#review-day-title { font-size: 13px; font-weight: 700; color: #78350F; }
#review-day-sub { font-size: 11px; color: #92400E; margin-top: 2px; }

.para-block.needs-review { border-left: 3px solid #F59E0B; padding-left: 4px; }
.review-badge {
  background: #FEF3C7; color: #92400E;
  border: 1px solid #F59E0B; border-radius: 4px;
  font-size: 11px; font-weight: 700; padding: 2px 6px;
  margin-right: 4px;
}

/* ===== Practice Screen ===== */
.practice-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.back-btn {
  background: none; border: none; color: #4F46E5;
  font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 0; font-family: inherit;
}
.chunk-counter { font-size: 13px; color: #64748B; font-weight: 600; }

.step-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  margin-bottom: 10px;
}
.step-tag.tag-chunk { background: #EEF2FF; color: #4F46E5; }
.step-tag.tag-para  { background: #F5F3FF; color: #7C3AED; }
.step-tag.tag-full  { background: #FDF4FF; color: #C026D3; }

.chunk-display {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.english-text {
  font-size: 21px;
  font-weight: 600;
  color: #1E293B;
  line-height: 1.6;
  margin-bottom: 14px;
}

.divider { border: none; border-top: 1px solid #F1F5F9; margin-bottom: 12px; }

/* ===== 発音ガイド ===== */
.guide-toggle-row {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; margin-bottom: 6px;
}
.guide-toggle-label { font-size: 12px; color: #64748B; font-weight: 600; }
.guide-toggle {
  border: 1.5px solid #4F46E5; border-radius: 999px;
  padding: 2px 14px; font-size: 12px; font-weight: 700;
  background: #4F46E5; color: white; cursor: pointer;
}
.guide-toggle.off { background: white; color: #94A3B8; border-color: #CBD5E1; }

/* 注釈付き本文: 強勢ドット用に行間を広げる */
.english-text.ph-mode { line-height: 2.1; padding-top: 6px; }

.ph-word { position: relative; }
.ph-stress { font-weight: 700; }
.ph-stress::before {
  content: '●'; position: absolute; top: -0.85em; left: 50%;
  transform: translateX(-50%); font-size: 8px; color: #4F46E5;
}
.ph-weak { color: #9CA3AF; font-weight: 400; }

/* リンキングの弧（語間の下に小さなカーブ） */
.ph-link {
  display: inline-block; width: 0.55em; height: 0.4em;
  border-bottom: 2.5px solid #F59E0B;
  border-bottom-left-radius: 60%; border-bottom-right-radius: 60%;
  vertical-align: -0.32em; margin: 0 0.04em;
}
.ph-link-flap { border-bottom-color: #EF4444; }

/* 消える音・フラップT */
.ph-drop { color: #C2C9D4; text-decoration: line-through; text-decoration-color: #94A3B8; }
.ph-flap {
  color: #EF4444;
  text-decoration: underline wavy #EF4444;
  text-underline-offset: 3px;
}

/* 凡例 */
.ph-legend {
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  font-size: 11px; color: #64748B; margin-bottom: 10px;
}
.ph-legend > span { display: inline-flex; align-items: center; gap: 3px; }
.lg-dot { color: #4F46E5; font-size: 8px; }
.lg-weak { color: #9CA3AF; }
.lg-arc {
  display: inline-block; width: 0.9em; height: 0.4em;
  border-bottom: 2.5px solid #F59E0B;
  border-bottom-left-radius: 60%; border-bottom-right-radius: 60%;
}
.lg-drop { color: #C2C9D4; text-decoration: line-through; font-weight: 700; }
.lg-flap { color: #EF4444; text-decoration: underline wavy #EF4444; font-weight: 700; }

/* ===== ローマ字表示（日本語練習用） ===== */
.romaji-row {
  margin: 8px 0 12px;
  padding: 10px 14px;
  background: #EEF2FF;
  border-radius: 8px;
  border-left: 3px solid #4F46E5;
}
.romaji-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94A3B8;
  font-weight: 700;
  margin-bottom: 4px;
}
.romaji-text {
  font-size: 17px;
  color: #3730A3;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.03em;
}
.romaji-loading { font-size: 11px; color: #94A3B8; font-style: italic; }

/* 発音のコツ */
.ph-tips { margin-bottom: 4px; }
.ph-tips:empty { display: none; }
.ph-tips-title { font-size: 12px; font-weight: 700; color: #B45309; margin-bottom: 4px; }
.ph-tip {
  font-size: 13px; color: #78350F; background: #FFFBEB;
  border-left: 3px solid #F59E0B; border-radius: 0 8px 8px 0;
  padding: 5px 10px; margin-bottom: 5px; line-height: 1.55;
}

.translation-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em;
  color: #94A3B8; font-weight: 600; margin-bottom: 6px;
}
.japanese-text { font-size: 15px; color: #475569; line-height: 1.65; }
.loading-text { color: #94A3B8; font-size: 14px; }

.word-count {
  display: inline-block;
  font-size: 12px; color: #94A3B8;
  background: #F8FAFC; border: 1px solid #E2E8F0;
  padding: 3px 10px; border-radius: 999px; margin-top: 12px;
}

/* ===== Action Buttons ===== */
.action-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.action-buttons.four { grid-template-columns: repeat(4, 1fr); }

.action-btn {
  padding: 11px 4px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: all 0.15s;
  font-family: inherit;
}
.action-icon { font-size: 20px; line-height: 1; }

.btn-play  { background: #EEF2FF; color: #4F46E5; border-color: #C7D2FE; }
.btn-play:hover  { background: #4F46E5; color: white; border-color: #4F46E5; }
.btn-slow  { background: #FFF7ED; color: #EA580C; border-color: #FED7AA; }
.btn-slow:hover  { background: #EA580C; color: white; border-color: #EA580C; }
.btn-play.speaking, .btn-slow.speaking { background: #F0FDF4; color: #16A34A; border-color: #BBF7D0; }
.btn-play.speaking:hover, .btn-slow.speaking:hover { background: #16A34A; color: white; border-color: #16A34A; }
.btn-record { background: #FFF1F2; color: #E11D48; border-color: #FECDD3; }
.btn-record:hover { background: #E11D48; color: white; border-color: #E11D48; }
.btn-record.recording { background: #E11D48; color: white; border-color: #E11D48; animation: pulse 1.2s infinite; }
.btn-myvoice { background: #F0FDF4; color: #15803D; border-color: #BBF7D0; }
.btn-myvoice:hover { background: #15803D; color: white; border-color: #15803D; }
.btn-myvoice:disabled { opacity: 0.4; cursor: not-allowed; }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.65} }

.btn-cycle {
  display: block; width: 100%;
  padding: 11px 16px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #EEF2FF 0%, #FFF7ED 100%);
  border: 2px dashed #A5B4FC;
  border-radius: 10px;
  font-size: 13px; font-weight: 600; color: #4F46E5;
  cursor: pointer; font-family: inherit;
  transition: all 0.2s;
}
.btn-cycle:hover { background: linear-gradient(135deg, #4F46E5 0%, #EA580C 100%); color: white; border-style: solid; border-color: transparent; }
.btn-cycle.cycling { background: #F0FDF4; color: #16A34A; border-color: #86EFAC; border-style: solid; animation: pulse 1.4s infinite; }

.btn-backchain {
  display: block; width: 100%;
  padding: 11px 16px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #F0FDF4 0%, #EFF6FF 100%);
  border: 2px dashed #86EFAC;
  border-radius: 10px;
  font-size: 13px; font-weight: 600; color: #15803D;
  cursor: pointer; font-family: inherit;
  transition: all 0.2s;
}
.btn-backchain:hover { background: linear-gradient(135deg, #15803D 0%, #1D4ED8 100%); color: white; border-style: solid; border-color: transparent; }
.btn-backchain.active { background: #FEF2F2; color: #B91C1C; border-color: #FCA5A5; border-style: solid; }

.btn-shadow {
  display: block; width: 100%;
  padding: 11px 16px;
  margin-bottom: 12px;
  background: #F0F9FF; color: #0369A1;
  border: 1.5px dashed #7DD3FC; border-radius: 12px;
  font-size: 14px; font-weight: 600; text-align: left;
  cursor: pointer; font-family: inherit;
  transition: all 0.2s;
}
.btn-shadow:hover { background: linear-gradient(135deg, #0284C7 0%, #6366F1 100%); color: white; border-style: solid; border-color: transparent; }
.btn-shadow.active { background: #FFF7ED; color: #C2410C; border-color: #FED7AA; border-style: solid; }

.shadow-warning-box {
  background: #FFF7ED; border: 1.5px solid #FED7AA; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 14px;
  font-size: 13px; color: #92400E; line-height: 1.6;
}

.bc-panel {
  background: #F8FAFC;
  border: 1.5px solid #A5B4FC;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
}

/* 100%達成お祝いオーバーレイ */
.bc-celebrate {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #10B981, #059669);
  border-radius: 12px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 10;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.bc-celebrate.visible { opacity: 1; pointer-events: auto; }
.bc-celebrate-emoji { font-size: 48px; line-height: 1; }
.bc-celebrate-title { font-size: 22px; font-weight: 800; color: white; margin-top: 8px; }
.bc-celebrate-sub { font-size: 13px; color: rgba(255,255,255,0.85); margin-top: 4px; }

/* 自動進行セレクタ行 */
.bc-advance-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.bc-advance-label { font-size: 12px; color: #64748B; }
.bc-advance-sel {
  font-size: 12px; padding: 2px 6px;
  border: 1px solid #CBD5E1; border-radius: 6px;
  background: white; color: #374151; cursor: pointer;
  font-family: inherit;
}

/* 録音中・結果エリアを固定高さで確保しボタンが動かないようにする */
.bc-dynamic { min-height: 94px; }
.bc-header-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.bc-step-tag {
  font-size: 12px; font-weight: 700; color: #4F46E5;
  background: #EEF2FF; padding: 3px 8px; border-radius: 4px;
}
.bc-close {
  background: none; border: 1px solid #CBD5E1;
  border-radius: 6px; cursor: pointer;
  font-size: 12px; color: #64748B; padding: 3px 8px;
}
.bc-close:hover { background: #FEF2F2; color: #B91C1C; border-color: #FCA5A5; }
.bc-phrase {
  font-size: 22px; font-weight: 700; color: #1E293B;
  text-align: center; padding: 14px 0; min-height: 54px;
  line-height: 1.4;
}
/* 録音インジケーター（メイン練習画面） */
.rec-indicator {
  display: none;
  background: #DC2626;
  color: white;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 15px; font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  align-items: center; justify-content: center; gap: 10px;
}
.rec-indicator.visible { display: flex; }
.rec-dot {
  display: inline-block;
  width: 13px; height: 13px;
  background: white;
  border-radius: 50%;
  flex-shrink: 0;
  animation: rec-blink 0.7s infinite;
}
@keyframes rec-blink { 0%,100%{opacity:1;transform:scale(1.1)} 50%{opacity:0.3;transform:scale(0.7)} }

/* BC パネル内録音インジケーター */
.bc-rec-indicator {
  background: #DC2626;
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px; font-weight: 700;
  text-align: center;
  margin: 8px 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* バックチェイニング フォーカスモード（関係ないUI非表示） */
#screen-practice.bc-focus .progress-label,
#screen-practice.bc-focus .progress-wrap,
#screen-practice.bc-focus .completion-banner,
#screen-practice.bc-focus .step-tag,
#screen-practice.bc-focus .guide-toggle-row,
#screen-practice.bc-focus .chunk-display,
#screen-practice.bc-focus .action-buttons,
#screen-practice.bc-focus .rec-indicator,
#screen-practice.bc-focus .btn-cycle,
#screen-practice.bc-focus .btn-backchain,
#screen-practice.bc-focus .btn-shadow,
#screen-practice.bc-focus .result-area,
#screen-practice.bc-focus .nav-buttons { display: none !important; }

.bc-main-actions {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-top: 10px;
}
.bc-nav-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-top: 8px;
}
.bc-action-btn {
  padding: 9px 4px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  border: 1.5px solid #E2E8F0; background: white;
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.bc-action-btn:hover { background: #F1F5F9; }
.bc-record-btn.recording { background: #FEE2E2; border-color: #F87171; color: #B91C1C; }
.bc-nav-btn {
  padding: 9px 4px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  border: 1.5px solid #E2E8F0; background: #F8FAFC;
  cursor: pointer; transition: all 0.15s; font-family: inherit; color: #475569;
}
.bc-nav-btn:hover:not(:disabled) { background: #E2E8F0; }
.bc-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.bc-next-btn { background: #EEF2FF; border-color: #A5B4FC; color: #4F46E5; }
.bc-next-btn:hover { background: #4F46E5; color: white; border-color: #4F46E5; }
.bc-result-text {
  margin-top: 8px; font-size: 14px; color: #475569;
  text-align: center; padding: 6px; line-height: 1.6;
}
.bc-score-row {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
}

/* ===== Result Area ===== */
.result-area {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid #E2E8F0;
  display: none;
}
.result-area.visible { display: block; }

.result-label { font-size: 11px; color: #94A3B8; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; margin-bottom: 8px; }
.result-text { font-size: 15px; color: #1E293B; line-height: 1.5; margin-bottom: 14px; font-style: italic; }

.score-row { display: flex; align-items: center; gap: 12px; }
.score-bar-wrap { flex: 1; background: #E2E8F0; border-radius: 999px; height: 12px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 999px; transition: width 0.7s cubic-bezier(.22,1,.36,1); }
.score-number { font-size: 22px; font-weight: 800; min-width: 56px; text-align: right; }
.score-comment { font-size: 12px; color: #64748B; margin-top: 6px; text-align: right; }

/* ===== Navigation ===== */
.nav-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.btn-nav {
  padding: 13px;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  background: white;
  font-size: 14px; font-weight: 600; color: #475569;
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.btn-nav:hover { border-color: #4F46E5; color: #4F46E5; }
.btn-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-nav.next-special { border-color: #DDD6FE; color: #7C3AED; background: #F5F3FF; }

/* ===== Completion ===== */
.completion-banner {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
  display: none;
}
.completion-banner.visible { display: block; }
.completion-banner .congrats-icon { font-size: 36px; margin-bottom: 8px; }
.completion-banner h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.completion-banner p { font-size: 13px; opacity: 0.92; line-height: 1.6; }

/* ===== Loading Overlay ===== */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  display: none; align-items: center; justify-content: center;
  z-index: 999;
}
.loading-overlay.visible { display: flex; }
.loading-box {
  background: white; border-radius: 14px;
  padding: 28px 36px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.spinner {
  width: 38px; height: 38px;
  border: 3px solid #E2E8F0;
  border-top-color: #4F46E5;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-box p { font-size: 14px; color: #64748B; }

/* ===== Word Highlight ===== */
.word-hit  { background: #DCFCE7; color: #15803D; border-radius: 3px; padding: 0 3px; }
.word-miss { background: #FEE2E2; color: #B91C1C; border-radius: 3px; padding: 0 3px; text-decoration: line-through; }
.word-placeholder { background: #EFF6FF; color: #3B82F6; border-radius: 3px; padding: 0 3px; font-style: italic; }

/* ===== Run (paragraph / full) Screen ===== */
.full-text-display { font-size: 17px; line-height: 1.95; color: #1E293B; word-break: break-word; }

.run-record-hint {
  text-align: center; font-size: 12px; color: #9CA3AF;
  margin-bottom: 6px;
}

.btn-full-record {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 15px; border: 2px solid #FECDD3;
  border-radius: 12px; background: #FFF1F2; color: #E11D48;
  font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
  margin-bottom: 14px; transition: all 0.15s;
}
.btn-full-record:hover { background: #E11D48; color: white; border-color: #E11D48; }
.btn-full-record.recording { background: #E11D48; color: white; border-color: #E11D48; animation: pulse 1.2s infinite; }
.btn-full-record .rec-icon { font-size: 20px; }

.interim-box {
  background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 14px;
  font-size: 14px; color: #475569; line-height: 1.6; min-height: 48px;
  display: none; font-style: italic;
}
.interim-box.visible { display: block; }
.interim-box .interim-label {
  font-size: 11px; color: #94A3B8; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: 5px; font-style: normal;
}

.best-score-tag {
  display: none; font-size: 12px; color: #7C3AED; font-weight: 600;
  background: #F5F3FF; border-radius: 999px; padding: 2px 10px;
  margin-left: 8px; vertical-align: middle;
}

.legend-row { font-size: 12px; color: #94A3B8; margin-bottom: 12px; }
.legend-row span { border-radius: 3px; padding: 1px 6px; margin-right: 8px; }

/* ===== Scene (AI conversation) Screen ===== */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.topic-btn {
  padding: 10px 6px;
  background: white;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  font-size: 12px; font-weight: 600; color: #475569;
  cursor: pointer; font-family: inherit;
  transition: all 0.12s;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.topic-btn .topic-icon { font-size: 20px; }
.topic-btn.active { border-color: #4F46E5; background: #EEF2FF; color: #4F46E5; }

.text-input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  font-size: 14px; font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: 12px;
}
.text-input:focus { border-color: #4F46E5; }

.field-label { font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 8px; margin-top: 4px; }

/* ===== Scene preview ===== */
.turn-list { display: grid; gap: 8px; margin-bottom: 16px; }
.turn-bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px; line-height: 1.55;
}
.turn-bubble .turn-ja { font-size: 12px; color: #64748B; margin-top: 4px; }
.turn-a { background: white; border: 1px solid #E2E8F0; justify-self: start; border-bottom-left-radius: 4px; }
.turn-b { background: #EEF2FF; border: 1px solid #C7D2FE; justify-self: end; border-bottom-right-radius: 4px; }
.turn-speaker { font-size: 11px; font-weight: 700; color: #94A3B8; margin-bottom: 2px; }

/* ===== Roleplay ===== */
.rp-stage {
  background: white;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  min-height: 180px;
}
.rp-status {
  font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px;
  display: inline-block; margin-bottom: 12px;
}
.rp-status.partner { background: #EEF2FF; color: #4F46E5; }
.rp-status.you     { background: #FFF1F2; color: #E11D48; }
.rp-line { font-size: 19px; font-weight: 600; line-height: 1.6; margin-bottom: 10px; }
.rp-line.hidden-line { color: #94A3B8; font-size: 15px; font-weight: 500; font-style: italic; }
.rp-translation { font-size: 14px; color: #64748B; line-height: 1.6; }
.rp-progress { font-size: 12px; color: #94A3B8; text-align: right; margin-bottom: 8px; }
.rp-controls { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.rp-result { margin-top: 14px; padding-top: 12px; border-top: 1px solid #F1F5F9; display: none; }
.rp-result.visible { display: block; }

.rp-summary-list { display: grid; gap: 6px; margin: 14px 0; }
.rp-summary-item {
  display: flex; justify-content: space-between; align-items: center;
  background: white; border: 1px solid #E2E8F0; border-radius: 9px;
  padding: 9px 12px; font-size: 13px;
}
.rp-summary-item .rp-sum-text { flex: 1; margin-right: 10px; color: #334155; }

/* ===== Settings Modal ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.5);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px;
}
.modal-overlay.visible { display: flex; }
.modal-box {
  background: white; border-radius: 16px;
  padding: 24px; width: 100%; max-width: 480px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.3);
}
.modal-box h3 { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.modal-note {
  font-size: 12px; color: #64748B; line-height: 1.6;
  background: #F8FAFC; border: 1px solid #E2E8F0;
  border-radius: 9px; padding: 10px 12px; margin-bottom: 14px;
}
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.key-status { font-size: 12px; font-weight: 700; margin-bottom: 10px; }
.key-status.ok { color: #15803D; }
.key-status.none { color: #94A3B8; }

/* ===== Tips ===== */
.tips {
  margin-top: 20px;
  background: white;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid #E2E8F0;
}
.tips h3 { font-size: 13px; font-weight: 700; color: #4F46E5; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.tips ul { list-style: none; }
.tips li {
  font-size: 13px; color: #64748B; margin-bottom: 7px;
  padding-left: 18px; position: relative; line-height: 1.5;
}
.tips li::before { content: '✓'; position: absolute; left: 0; color: #10B981; font-weight: 700; }

.error-box {
  background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C;
  border-radius: 10px; padding: 12px 14px;
  font-size: 13px; line-height: 1.6; margin-bottom: 12px;
  display: none;
}
.error-box.visible { display: block; }

/* ===== タグチップ ===== */
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
  padding: 5px 12px;
  background: white; border: 1.5px solid #E2E8F0;
  border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #64748B;
  cursor: pointer; font-family: inherit; transition: all 0.12s;
}
.tag-chip:hover { border-color: #4F46E5; color: #4F46E5; }
.tag-chip.active { background: #4F46E5; color: white; border-color: #4F46E5; }

/* BCフォーカスモード */

/* ===== 学習履歴画面 ===== */
.history-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin-bottom: 20px;
}
.stat-item {
  background: white; border: 1px solid #E2E8F0;
  border-radius: 10px; padding: 14px 8px; text-align: center;
}
.stat-num { font-size: 20px; font-weight: 800; color: #4F46E5; }
.stat-lbl { font-size: 11px; color: #94A3B8; font-weight: 600; margin-top: 4px; }

.history-storage-info { margin-bottom: 16px; }
.storage-info-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px; margin-bottom: 6px;
}
.storage-info-label { font-size: 13px; color: #334155; }
.storage-info-note { font-size: 11px; color: #94A3B8; }
.storage-bar-wrap {
  height: 6px; background: #E2E8F0; border-radius: 999px; overflow: hidden;
}
.storage-bar-fill {
  height: 100%; background: #6366F1; border-radius: 999px;
  transition: width 0.4s ease;
}

.history-chart-label {
  font-size: 12px; font-weight: 700; color: #64748B;
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px;
}
.history-chart-box {
  background: white; border: 1px solid #E2E8F0;
  border-radius: 10px; padding: 12px; margin-bottom: 6px; overflow: hidden;
}
.history-dates {
  display: flex; margin-bottom: 16px; padding: 0 12px;
}
.date-cell { flex: 1; text-align: center; font-size: 10px; color: #94A3B8; font-weight: 600; }
.date-cell.today { color: #4F46E5; font-weight: 800; }

.history-log { display: grid; gap: 8px; margin-top: 8px; }
.log-item {
  background: white; border: 1px solid #E2E8F0;
  border-radius: 10px; padding: 12px 14px;
}
.log-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.log-date { font-size: 12px; color: #94A3B8; }
.log-tag {
  font-size: 11px; font-weight: 700;
  background: #EEF2FF; color: #4F46E5;
  padding: 2px 8px; border-radius: 999px;
}
.log-lang { font-size: 14px; }
.log-detail { font-size: 13px; color: #475569; }

.history-empty {
  text-align: center; color: #94A3B8;
  font-size: 14px; line-height: 1.8; padding: 40px 0;
}

/* ===== Responsive ===== */
@media (max-width: 400px) {
  .english-text { font-size: 18px; }
  .action-icon { font-size: 17px; }
  .action-btn { font-size: 11px; padding: 9px 3px; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 自己紹介トピック ホームカード ===== */
.home-card-topics {
  cursor: pointer;
  background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
  border: 1.5px solid #6EE7B7;
  transition: background 0.15s, box-shadow 0.15s;
}
.home-card-topics:hover { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); box-shadow: 0 2px 12px rgba(16,185,129,0.18); }
.home-card-topics h2 { color: #059669; }
.btn-topics-arrow { font-size: 14px; font-weight: 700; color: #059669; margin-top: 8px; }

/* ヒーローカード（自己紹介：最上部・強調） */
.home-card-hero {
  background: linear-gradient(135deg, #ECFDF5, #CCFBF1) !important;
  border: 2px solid #10B981 !important;
  box-shadow: 0 4px 20px rgba(16,185,129,0.2) !important;
  padding: 24px 20px !important;
}
.home-card-hero h2 { font-size: 20px !important; }
.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, #059669, #10B981);
  color: white;
  font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}
.btn-hero-start {
  display: block;
  background: linear-gradient(135deg, #059669, #10B981);
  color: white;
  font-size: 16px; font-weight: 700;
  text-align: center;
  padding: 14px;
  border-radius: 10px;
  margin-top: 14px;
  transition: opacity 0.15s, transform 0.15s;
}
.home-card-hero:hover .btn-hero-start {
  opacity: 0.9; transform: translateY(-1px);
}

/* セクション区切り */
.home-section-header {
  font-size: 12px; font-weight: 700; color: #94A3B8;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 0 12px;
  border-top: 1px solid #E2E8F0;
  margin-top: 4px;
}

/* ===== Screen: Topics ===== */
.topics-intro {
  font-size: 13px; color: #64748B; line-height: 1.7;
  margin-bottom: 14px; padding: 10px 12px;
  background: #F8FAFC; border-radius: 8px;
  border-left: 3px solid #6EE7B7;
}
.topics-intro strong { color: #059669; }

/* トピック一覧アイテム */
.topic-item {
  display: flex; align-items: center; gap: 12px;
  background: white; border: 1px solid #E2E8F0;
  border-radius: 10px; padding: 12px 14px;
  margin-bottom: 8px; cursor: pointer;
  transition: all 0.15s;
}
.topic-item:hover { background: #F8FAFC; border-color: #A5B4FC; }
.topic-item.done { border-left: 3px solid #10B981; }
.topic-item.practicing { border-left: 3px solid #F59E0B; }

.ti-num {
  font-size: 12px; font-weight: 700; color: #94A3B8;
  min-width: 22px; text-align: center;
}
.ti-body { flex: 1; min-width: 0; }
.ti-title { font-size: 14px; font-weight: 700; color: #1E293B; }
.ti-desc  { font-size: 11px; color: #94A3B8; margin-top: 2px; }
.ti-badge { flex-shrink: 0; }
.ti-custom { font-size: 11px; color: #059669; }

.tl-badge {
  font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 10px; white-space: nowrap;
}
.tl-done      { background: #D1FAE5; color: #065F46; }
.tl-practicing { background: #FEF3C7; color: #92400E; }
.tl-unstarted  { background: #F1F5F9; color: #94A3B8; }
.tl-due        { background: #EFF6FF; color: #1D4ED8; font-weight: 700; }

.srs-due-banner {
  display: flex; align-items: center; gap: 12px;
  background: #EFF6FF; border: 1.5px solid #BFDBFE;
  border-radius: 12px; padding: 12px 16px; margin-bottom: 14px;
}
.srs-due-icon { font-size: 22px; }
.srs-due-title { font-size: 14px; font-weight: 700; color: #1D4ED8; }
.srs-due-sub { font-size: 12px; color: #3B82F6; margin-top: 2px; }

/* トピック詳細カード */
.topic-detail-card {
  background: white; border: 1px solid #E2E8F0;
  border-radius: 14px; padding: 20px; margin-top: 8px;
}
.td-title { font-size: 18px; font-weight: 800; color: #1E293B; margin-bottom: 4px; }
.td-desc  { font-size: 13px; color: #64748B; margin-bottom: 8px; }
.td-score { font-size: 12px; font-weight: 700; color: #059669; margin-bottom: 6px; }
.td-saved-badge {
  font-size: 11px; color: #065F46; background: #D1FAE5;
  border: 1px solid #6EE7B7; border-radius: 6px;
  padding: 4px 10px; margin-bottom: 10px;
}
.td-hint {
  font-size: 12px; color: #94A3B8; margin-bottom: 8px; font-style: italic;
}
.td-text {
  font-size: 16px; font-weight: 600; color: #1E293B; line-height: 1.8;
  background: #F8FAFC; border: 1px solid #E2E8F0;
  border-radius: 8px; padding: 14px 16px; margin-bottom: 10px;
  white-space: pre-wrap;
}
.td-edit-btn {
  background: none; border: 1.5px solid #CBD5E1;
  border-radius: 8px; padding: 7px 14px;
  font-size: 13px; color: #475569; cursor: pointer;
  font-family: inherit; transition: all 0.15s;
}
.td-edit-btn:hover { background: #F8FAFC; border-color: #A5B4FC; color: #4F46E5; }

.td-textarea {
  width: 100%; border: 1.5px solid #A5B4FC;
  border-radius: 8px; padding: 12px; font-size: 15px;
  font-family: inherit; line-height: 1.7; resize: vertical;
  outline: none; color: #1E293B;
  margin-bottom: 10px;
}
.td-textarea:focus { border-color: #4F46E5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }

.td-edit-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: flex-end;
}

/* ===== ウェルカムチュートリアルモーダル ===== */
.welcome-box {
  max-width: 360px;
  text-align: center;
}
.wl-hero { font-size: 48px; margin-bottom: 8px; }
.wl-title { font-size: 22px; font-weight: 800; color: #1E293B; margin-bottom: 4px; }
.wl-sub { font-size: 14px; color: #4F46E5; font-weight: 700; margin-bottom: 12px; }
.wl-desc {
  font-size: 13px; color: #475569; line-height: 1.7;
  margin-bottom: 16px;
}
.wl-steps {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  text-align: left;
}
.wl-step {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 8px;
}
.wl-step:last-child { margin-bottom: 0; }
.wl-step-num {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex-shrink: 0;
  background: #4F46E5; color: white;
  border-radius: 50%; font-size: 12px; font-weight: 800;
}
.wl-step-text { font-size: 13px; color: #1E293B; line-height: 1.5; padding-top: 2px; }
.wl-note {
  font-size: 12px; color: #92400E;
  background: #FFFBEB; border: 1px solid #FDE68A;
  border-radius: 8px; padding: 8px 12px;
  margin-bottom: 16px; line-height: 1.6;
}
.wl-start-btn { font-size: 17px; padding: 16px; }

/* ===== 練習状態バー ===== */
.practice-state-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 14px; font-weight: 700;
}
.psb-speaking {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1.5px solid #BFDBFE;
}
.psb-recording {
  background: #FFF1F2;
  color: #BE123C;
  border: 1.5px solid #FECDD3;
}
.psb-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: psb-blink 1s infinite;
}
.psb-speaking .psb-dot { background: #3B82F6; }
.psb-recording .psb-dot { background: #F43F5E; }
@keyframes psb-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* ===== 沈黙ヒント ===== */
.silence-hint {
  background: #FFFBEB;
  border: 1.5px solid #FCD34D;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.sh-header {
  font-size: 13px; font-weight: 700; color: #92400E;
  margin-bottom: 10px;
}
.sh-btn {
  display: block; width: 100%;
  background: white; border: 1px solid #FDE68A;
  border-radius: 8px; padding: 10px 14px;
  font-size: 13px; color: #78350F; font-weight: 600;
  cursor: pointer; font-family: inherit;
  text-align: left; margin-bottom: 6px;
  transition: background 0.15s;
}
.sh-btn:hover { background: #FEF3C7; }
.sh-close {
  display: block; width: 100%;
  background: none; border: none;
  font-size: 12px; color: #94A3B8;
  cursor: pointer; padding: 4px 0 0;
  font-family: inherit; text-align: right;
}

/* ===== マイク拒否リカバリーモーダル ===== */
.mic-blocked-steps { margin-bottom: 16px; }
.mic-blocked-section {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
}
.mic-blocked-os {
  font-size: 13px; font-weight: 700; color: #1E293B;
  margin-bottom: 6px;
}
.mic-blocked-list {
  padding-left: 18px;
  margin: 0;
}
.mic-blocked-list li {
  font-size: 12px; color: #475569;
  line-height: 1.7;
}

/* ===== 練習モードバー（ヘッダー直下） ===== */
.practice-mode-bar {
  background: linear-gradient(135deg, #3730A3, #6D28D9);
  display: flex;
  gap: 6px;
  padding: 8px 16px 10px;
}
.pm-btn {
  flex: 1;
  padding: 6px 2px;
  background: rgba(255,255,255,0.12);
  border: none;
  color: rgba(255,255,255,0.75);
  border-radius: 8px;
  font-size: 11px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}
.pm-btn.active { background: white; color: #4F46E5; }
.pm-btn:hover:not(.active) { background: rgba(255,255,255,0.25); color: white; }

/* ===== 練習モード別UI切替 ===== */
/* chunk モード: cycle/backchain/shadow/bc-panel を非表示 */
#screen-practice[data-mode="chunk"] .btn-cycle,
#screen-practice[data-mode="chunk"] .btn-backchain,
#screen-practice[data-mode="chunk"] .btn-shadow,
#screen-practice[data-mode="chunk"] .bc-panel { display: none !important; }

/* 3step モード: action-buttons/backchain/shadow/bc-panel を非表示 */
#screen-practice[data-mode="3step"] .action-buttons,
#screen-practice[data-mode="3step"] .btn-backchain,
#screen-practice[data-mode="3step"] .btn-shadow,
#screen-practice[data-mode="3step"] .bc-panel { display: none !important; }

/* backchain モード: action-buttons/cycle/shadow/result/rec-indicator/silence-hint を非表示 */
#screen-practice[data-mode="backchain"] .action-buttons,
#screen-practice[data-mode="backchain"] .btn-cycle,
#screen-practice[data-mode="backchain"] .btn-shadow,
#screen-practice[data-mode="backchain"] .result-area,
#screen-practice[data-mode="backchain"] .rec-indicator,
#screen-practice[data-mode="backchain"] .silence-hint { display: none !important; }

/* shadow モード: action-buttons/cycle/backchain/bc-panel/rec-indicator/silence-hint を非表示 */
#screen-practice[data-mode="shadow"] .action-buttons,
#screen-practice[data-mode="shadow"] .btn-cycle,
#screen-practice[data-mode="shadow"] .btn-backchain,
#screen-practice[data-mode="shadow"] .bc-panel,
#screen-practice[data-mode="shadow"] .rec-indicator,
#screen-practice[data-mode="shadow"] .silence-hint { display: none !important; }

/* シャドーイング中: テキストを大きく中央揃え */
#screen-practice.shadowing-active .chunk-display { text-align: center; }
#screen-practice.shadowing-active .english-text { font-size: 26px; }

/* ===== テキスト練習カード折り畳み ===== */
#text-practice-expanded { padding-top: 14px; }

/* ===== チュートリアルオーバーレイ ===== */
.tut-mask {
  position: fixed;
  background: rgba(0,0,0,0.68);
  z-index: 3000;
  pointer-events: auto;
}
.tut-highlight-box {
  position: fixed;
  z-index: 3001;
  pointer-events: none;
  border: 3px solid #F59E0B;
  border-radius: 12px;
  box-shadow: 0 0 0 4px rgba(245,158,11,0.3);
  animation: tut-glow 1.5s infinite;
}
@keyframes tut-glow {
  0%,100% { box-shadow: 0 0 0 4px rgba(245,158,11,0.3); }
  50% { box-shadow: 0 0 0 10px rgba(245,158,11,0.5); }
}
.tut-card {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
  max-width: 400px;
  background: white; border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  z-index: 3010;
}
.tut-step-num {
  font-size: 11px; color: #94A3B8; font-weight: 700;
  letter-spacing: 0.05em; margin-bottom: 8px;
}
.tut-text {
  font-size: 14px; line-height: 1.75; color: #1E293B;
  margin-bottom: 16px; white-space: pre-line;
}
.tut-actions { display: flex; justify-content: space-between; align-items: center; }
.tut-skip-btn {
  background: none; border: none; color: #94A3B8;
  font-size: 13px; cursor: pointer; font-family: inherit;
}
.tut-next-btn {
  background: #4F46E5; color: white;
  border: none; border-radius: 10px;
  padding: 10px 22px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
#tut-hole-blocker {
  position: fixed;
  z-index: 3001;
  pointer-events: auto;
  background: transparent;
}
