/* =========================
   基本設定
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f9fc;
  color: #1a1a1a;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

/* =========================
   ヘッダー
========================= */
.app-header {
  text-align: center;
  margin-bottom: 16px;
}

.app-logo {
  width: 64px;
  margin-bottom: 8px;
}

.app-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.app-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: #666;
}

/* =========================
   カード
========================= */
.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.section-title {
  font-size: 14px;
  margin-bottom: 12px;
}

/* =========================
   ボタン共通
========================= */
button {
  font-size: 14px;
  border: none;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
}

.primary-btn {
  width: 100%;
  background: #1f3c88;
  color: white;
  font-weight: 600;
}

.primary-btn.disabled {
  background: #c0c7d6;
  cursor: not-allowed;
}

.secondary-btn {
  width: 100%;
  background: #e8ecf5;
}

/* =========================
   難易度選択
========================= */
.difficulty-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.choice-btn {
  background: #eef3fb;
}

.choice-btn.active {
  background: #1f3c88;
  color: white;
}

/* =========================
   時間入力
========================= */
.estimate-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.adjust-btn {
  width: 48px;
  height: 48px;
  font-size: 20px;
}

.estimate-value-wrap {
  text-align: center;
}

.estimate-value {
  font-size: 28px;
  font-weight: bold;
}

.estimate-unit {
  font-size: 14px;
}

.estimate-slider {
  width: 100%;
  margin-top: 12px;
}

/* =========================
   タイマー
========================= */
.time-row {
  display: flex;
  justify-content: space-between;
}

.time-box {
  text-align: center;
  width: 48%;
}

.time-label {
  font-size: 12px;
  color: #666;
}

.time-value {
  font-size: 28px;
  font-weight: bold;
}

.time-value.small {
  font-size: 18px;
}

/* =========================
   プログレスバー
========================= */
.progress-wrap {
  margin-top: 12px;
}

.progress-label {
  font-size: 12px;
  margin-bottom: 4px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e0e6f0;
  border-radius: 4px;
}

.progress-fill {
  height: 100%;
  background: #4db6ac;
  border-radius: 4px;
  width: 100%;
}

/* =========================
   ポーズボタン
========================= */
.pause-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pause-btn {
  background: #eef3fb;
}

.pause-btn.active {
  background: #4db6ac;
  color: white;
}

/* =========================
   ポーズ画面
========================= */
.pause-card {
  text-align: center;
}

.current-reason-text {
  font-size: 18px;
  font-weight: bold;
  margin: 8px 0 16px;
}

/* =========================
   結果画面
========================= */
.result-block {
  margin-bottom: 12px;
}

.generated-code {
  background: #eef3fb;
  padding: 8px;
  border-radius: 8px;
  font-size: 12px;
  word-break: break-all;
}

.study-point {
  font-size: 24px;
  font-weight: bold;
  text-align: center;
}

/* =========================
   画面切り替え
========================= */
.screen {
  display: none;
}

.screen.active {
  display: block;
}