/* ============================================================
   英熟語1000 - スタイルシート
   Appleライクな透明感（Glassmorphism）デザイン
   ============================================================ */

:root {
  --font-main: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --color-bg-start: #FBFBFD;
  --color-bg-end: #EEF0F4;
  --color-text: #1D1D1F;
  --color-text-sub: #6E6E73;
  --color-accent: #0A84FF;
  --color-accent2: #5E5CE6;
  --color-green: #30D158;
  --color-red: #FF453A;
  --color-orange: #FF9F0A;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow-soft: 0 8px 32px rgba(31, 38, 60, 0.08);
  --shadow-deep: 0 20px 60px rgba(31, 38, 60, 0.16);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --header-h: 68px;
  --nav-h: 78px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-main);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

#app-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, var(--color-bg-start) 0%, var(--color-bg-end) 55%, #F4F1F8 100%);
}
#app-bg::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(circle, rgba(94, 92, 230, 0.10), transparent 70%);
  border-radius: 50%;
}
#app-bg::after {
  content: '';
  position: absolute;
  bottom: -15%;
  left: -10%;
  width: 55vw;
  height: 55vw;
  max-width: 620px;
  max-height: 620px;
  background: radial-gradient(circle, rgba(10, 132, 255, 0.08), transparent 70%);
  border-radius: 50%;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
}

/* ============ ヘッダー ============ */
#app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  box-shadow: 0 2px 20px rgba(31,38,60,0.05);
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.brand { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand-mark { color: var(--color-text); }
.brand-num { color: var(--color-accent); margin-left: 4px; }
.header-progress { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--color-text-sub); font-weight: 600; }
.header-progress-bar {
  width: 100px; height: 6px; border-radius: 3px;
  background: rgba(0,0,0,0.08); overflow: hidden;
}
.header-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent2));
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ============ メインコンテンツ領域 ============ */
#main-content {
  padding-top: calc(var(--header-h) + 14px);
  padding-bottom: calc(var(--nav-h) + 20px);
  min-height: 100vh;
  max-width: 900px;
  margin: 0 auto;
}

.view { display: none; padding: 0 16px; animation: fadeIn 0.35s ease; }
.view.active-view { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: translateY(0);} }

/* ============ ボトムナビ ============ */
#bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -2px 20px rgba(31,38,60,0.06);
}
.nav-btn {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--color-text-sub);
  cursor: pointer;
  transition: color 0.2s, transform 0.15s;
  height: 100%;
  font-family: inherit;
}
.nav-btn i { font-size: 20px; transition: transform 0.2s; }
.nav-btn.active { color: var(--color-accent); }
.nav-btn.active i { transform: translateY(-2px) scale(1.05); }
.nav-btn:active { transform: scale(0.94); }

/* ============ 一覧ビュー ツールバー ============ */
.list-toolbar {
  position: sticky;
  top: calc(var(--header-h) + 8px);
  z-index: 50;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-soft);
}
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(120,120,128,0.12);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  height: 40px;
  margin-bottom: 12px;
}
.search-icon { color: var(--color-text-sub); font-size: 14px; margin-right: 8px; }
#search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  color: var(--color-text);
  font-family: inherit;
}
.search-clear {
  border: none; background: transparent; color: var(--color-text-sub);
  cursor: pointer; padding: 4px; display: none; font-size: 13px;
}
.search-wrap.has-text .search-clear { display: block; }

.toolbar-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.switch-control {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.switch-control.full-row { justify-content: space-between; width: 100%; margin-bottom: 14px; }
.switch-label { font-size: 13px; font-weight: 600; color: var(--color-text); }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(120,120,128,0.24);
  border-radius: 24px;
  transition: background 0.2s;
}
.switch-slider::before {
  content: '';
  position: absolute;
  height: 20px; width: 20px;
  left: 2px; bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.switch input:checked + .switch-slider { background: var(--color-green); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }

.sort-control select, #cards-deck-select, #quiz-range-select, #quiz-count-select, #quiz-type-select {
  border: none;
  background: rgba(120,120,128,0.12);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-filter {
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.5);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-sub);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.chip-filter.active {
  background: var(--color-text);
  color: white;
  border-color: var(--color-text);
}

.list-count {
  font-size: 12px;
  color: var(--color-text-sub);
  font-weight: 600;
  padding: 0 4px 8px;
}

/* ============ 単語リスト ============ */
.word-list { position: relative; }
.word-row {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  overflow: hidden;
  transition: background 0.2s, box-shadow 0.2s;
  scroll-margin-top: 220px;
}
.word-row.selected { background: rgba(10,132,255,0.10); border-color: rgba(10,132,255,0.25); }
.word-row.known { box-shadow: inset 3px 0 0 var(--color-green); }
.word-row.weak { box-shadow: inset 3px 0 0 var(--color-orange); }

.word-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
}
.word-id {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-sub);
  background: rgba(120,120,128,0.14);
  border-radius: 6px;
  padding: 2px 6px;
  min-width: 34px;
  text-align: center;
  flex-shrink: 0;
}
.word-main-text { flex: 1; min-width: 0; }
.word-phrase { font-size: 15.5px; font-weight: 700; color: var(--color-text); letter-spacing: -0.01em; }
.word-meaning {
  font-size: 13px; color: var(--color-text-sub); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.word-meaning.masked {
  background: rgba(120,120,128,0.22);
  color: transparent;
  border-radius: 4px;
  user-select: none;
}
.word-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.row-action-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.6);
  color: var(--color-text-sub);
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.row-action-btn:active { transform: scale(0.9); }
.row-action-btn.known-on { background: var(--color-green); color: white; border-color: var(--color-green); }
.row-action-btn.weak-on { background: var(--color-orange); color: white; border-color: var(--color-orange); }
.expand-caret { color: var(--color-text-sub); font-size: 12px; transition: transform 0.25s; flex-shrink: 0; }
.word-row.expanded .expand-caret { transform: rotate(180deg); }

.word-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 16px;
}
.word-row.expanded .word-detail {
  max-height: 600px;
  padding: 0 16px 16px;
}
.detail-inner {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 12px;
}
.detail-meaning-full { font-size: 14px; line-height: 1.7; color: var(--color-text); margin-bottom: 10px; }
.detail-meaning-full .meaning-part { display: block; margin-bottom: 4px; }
.detail-block { margin-bottom: 10px; }
.detail-block-label {
  font-size: 11px; font-weight: 700; color: var(--color-accent);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px;
}
.detail-example {
  font-size: 14px; color: var(--color-text); line-height: 1.6;
  background: rgba(10,132,255,0.06);
  border-radius: 10px; padding: 10px 12px;
  font-style: italic;
}
.detail-synonyms { display: flex; gap: 6px; flex-wrap: wrap; }
.synonym-chip {
  background: rgba(94,92,230,0.10); color: var(--color-accent2);
  font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 10px;
}
.detail-speak-btn {
  border: none; background: rgba(10,132,255,0.10); color: var(--color-accent);
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}

/* ============ A-Zジャンプバー ============ */
.az-jump {
  position: fixed;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  border-radius: 20px;
  padding: 8px 3px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: center;
  box-shadow: var(--shadow-soft);
}
.az-jump-item {
  font-size: 9px;
  font-weight: 700;
  color: var(--color-text-sub);
  width: 16px;
  text-align: center;
  cursor: pointer;
  line-height: 1.5;
  border-radius: 3px;
}
.az-jump-item.active-hint { color: var(--color-accent); }

/* ============ カードビュー ============ */
.cards-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
}
.cards-progress { font-size: 13px; font-weight: 700; color: var(--color-text-sub); }
.cards-filter { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  border: none; background: rgba(120,120,128,0.12);
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--color-text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.card-stage {
  display: flex; justify-content: center; align-items: center;
  min-height: 400px;
  perspective: 1400px;
  touch-action: pan-y;
}
.flash-card {
  width: 100%;
  max-width: 420px;
  height: 380px;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s ease;
}
.flash-card.swipe-left { transform: translateX(-140%) rotate(-12deg); opacity: 0; }
.flash-card.swipe-right { transform: translateX(140%) rotate(12deg); opacity: 0; }
.flash-card-inner {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
}
.flash-card.flipped .flash-card-inner { transform: rotateY(180deg); }
.flash-card-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-deep);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 26px;
  text-align: center;
}
.flash-card-back { transform: rotateY(180deg); }
.card-id {
  position: absolute; top: 18px; left: 20px;
  font-size: 12px; font-weight: 700; color: var(--color-text-sub);
  background: rgba(120,120,128,0.14); border-radius: 6px; padding: 3px 8px;
}
.card-phrase { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.4; color: var(--color-text); }
.speak-btn {
  margin-top: 18px;
  border: none; background: rgba(10,132,255,0.10); color: var(--color-accent);
  width: 44px; height: 44px; border-radius: 50%; font-size: 17px; cursor: pointer;
}
.card-hint { position: absolute; bottom: 18px; font-size: 11.5px; color: var(--color-text-sub); font-weight: 600; }
.card-meaning { font-size: 18px; font-weight: 700; line-height: 1.7; color: var(--color-text); margin-bottom: 14px; white-space: pre-line; }
.card-example { font-size: 14px; color: var(--color-text-sub); font-style: italic; line-height: 1.6; padding: 0 6px; }

.cards-controls {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 26px;
}
.cards-nav-btn {
  width: 50px; height: 50px; border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg); color: var(--color-text);
  font-size: 18px; cursor: pointer; box-shadow: var(--shadow-soft);
}
.cards-sort-btn {
  border: none; border-radius: 999px; padding: 14px 22px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-soft);
}
.weak-btn { background: rgba(255,159,10,0.14); color: #B5690B; }
.known-btn { background: rgba(48,209,88,0.14); color: #1C8A3B; }

/* ============ テストビュー ============ */
.quiz-setup {
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  margin-top: 10px;
}
.quiz-setup h2 { margin: 0 0 18px; font-size: 19px; font-weight: 800; }
.quiz-setup-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.quiz-setup-row label { font-size: 14px; font-weight: 600; color: var(--color-text); }
.primary-btn {
  width: 100%;
  border: none; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent2));
  color: white; font-size: 15.5px; font-weight: 700;
  padding: 15px; cursor: pointer; margin-top: 8px;
  box-shadow: 0 8px 24px rgba(10,132,255,0.28);
  font-family: inherit;
}
.primary-btn:active { transform: scale(0.98); }
.secondary-btn {
  border: 1px solid rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.6);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 13.5px; font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.danger-btn {
  border: none;
  background: rgba(255,69,58,0.1);
  color: var(--color-red);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13.5px; font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 14px;
  font-family: inherit;
}

.quiz-progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.quiz-progress-bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(0,0,0,0.07); overflow: hidden; }
.quiz-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--color-accent), var(--color-accent2)); transition: width 0.3s; }
#quiz-progress-text { font-size: 12.5px; font-weight: 700; color: var(--color-text-sub); flex-shrink: 0; }

.quiz-card {
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  text-align: center;
  margin-bottom: 22px;
  min-height: 130px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform 0.15s;
}
.quiz-card.shake { animation: shakeCard 0.4s; }
@keyframes shakeCard {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}
.quiz-card.flash-correct { background: rgba(48,209,88,0.22); }
.quiz-question-label { font-size: 12px; font-weight: 700; color: var(--color-text-sub); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.03em; }
.quiz-question { font-size: 21px; font-weight: 800; line-height: 1.6; color: var(--color-text); }

.quiz-choices { display: flex; flex-direction: column; gap: 10px; }
.quiz-choice-btn {
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 14.5px; font-weight: 600; text-align: left;
  color: var(--color-text);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.quiz-choice-btn:active { transform: scale(0.99); }
.quiz-choice-btn.correct-choice { background: rgba(48,209,88,0.22); border-color: var(--color-green); }
.quiz-choice-btn.wrong-choice { background: rgba(255,69,58,0.18); border-color: var(--color-red); }
.quiz-choice-btn.disabled { pointer-events: none; opacity: 0.75; }

.quiz-result { border-radius: var(--radius-lg); padding: 34px 26px; text-align: center; margin-top: 10px; }
.result-ring-wrap { position: relative; width: 140px; height: 140px; margin: 0 auto 16px; }
.result-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.result-ring-bg { fill: none; stroke: rgba(0,0,0,0.07); stroke-width: 10; }
.result-ring-fg { fill: none; stroke: var(--color-accent); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 1s ease; }
.result-ring-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; }
.result-score { font-size: 16px; font-weight: 700; color: var(--color-text-sub); margin-bottom: 6px; }
.result-message { font-size: 14px; color: var(--color-text-sub); margin-bottom: 20px; }
.result-actions { display: flex; gap: 10px; }
.result-actions .secondary-btn, .result-actions .primary-btn { flex: 1; margin-top: 0; }
.result-wrong-list { margin-top: 20px; text-align: left; }
.result-wrong-item { padding: 10px 4px; border-bottom: 1px solid rgba(0,0,0,0.06); font-size: 13.5px; }
.result-wrong-item b { color: var(--color-red); }

/* ============ 統計ビュー ============ */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 4px; }
.stats-card {
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  box-shadow: var(--shadow-soft);
}
.stats-card h3 { margin: 0 0 14px; font-size: 14px; font-weight: 700; }
.wide-card { grid-column: 1 / -1; }
.ring-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ring-wrap { position: relative; width: 160px; height: 160px; margin: 0 auto; }
.progress-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.progress-ring-bg { fill: none; stroke: rgba(0,0,0,0.06); stroke-width: 12; }
.progress-ring-fg { fill: none; stroke: url(#none); stroke: var(--color-accent); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 427.3; stroke-dashoffset: 427.3; transition: stroke-dashoffset 1s ease; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num { font-size: 30px; font-weight: 800; }
.ring-den { font-size: 12px; color: var(--color-text-sub); font-weight: 600; }
.ring-sub { margin-top: 14px; font-size: 12.5px; color: var(--color-text-sub); font-weight: 600; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.dot-known { background: var(--color-green); }
.dot-weak { background: var(--color-orange); }

.bar-list { display: flex; flex-direction: column; gap: 12px; }
.bar-item-label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; margin-bottom: 4px; color: var(--color-text-sub); }
.bar-track { height: 8px; border-radius: 4px; background: rgba(0,0,0,0.06); overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--color-accent), var(--color-accent2)); border-radius: 4px; transition: width 0.6s ease; }

.chapter-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.chapter-cell { text-align: center; }
.chapter-cell-ring { width: 46px; height: 46px; margin: 0 auto 6px; position: relative; }
.chapter-cell-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.chapter-cell-bg { fill: none; stroke: rgba(0,0,0,0.07); stroke-width: 5; }
.chapter-cell-fg { fill: none; stroke: var(--color-accent2); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.chapter-cell-label { font-size: 10.5px; font-weight: 700; color: var(--color-text-sub); }

.chart-wrap { height: 220px; }

.weak-top-list { display: flex; flex-direction: column; gap: 8px; }
.weak-top-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255,159,10,0.08);
  border-radius: 10px;
  font-size: 13.5px;
}
.weak-top-item .wt-phrase { font-weight: 700; }
.weak-top-item .wt-count { font-size: 11.5px; font-weight: 700; color: var(--color-orange); background: rgba(255,159,10,0.16); padding: 2px 8px; border-radius: 999px; }
.empty-hint { font-size: 13px; color: var(--color-text-sub); text-align: center; padding: 20px 0; }

/* ============ 設定ビュー ============ */
.settings-list { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.settings-card { border-radius: var(--radius-lg); padding: 20px 18px; box-shadow: var(--shadow-soft); }
.settings-card h3 { margin: 0 0 16px; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.settings-desc { font-size: 13px; color: var(--color-text-sub); line-height: 1.7; margin: 0 0 14px; }
.settings-row { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.settings-row-label { font-size: 13px; font-weight: 600; flex-shrink: 0; width: 100px; }
.settings-row input[type=range] { flex: 1; }
.settings-btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.file-label { display: inline-flex; align-items: center; gap: 6px; }

/* ============ トースト ============ */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(29,29,31,0.9);
  color: white;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  backdrop-filter: blur(10px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ レスポンシブ ============ */
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .chapter-grid { grid-template-columns: repeat(5, 1fr); }
  .card-phrase { font-size: 21px; }
  .flash-card { height: 340px; }
  .az-jump { display: none; }
  .brand { font-size: 17px; }
}

@media (min-width: 601px) {
  .az-jump { display: flex; }
}

/* スクロールバー最小化 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }
