/* ===== タイマー — シンプルなツールサイト風デザイン =====
   白背景・控えめな枠線・装飾最小限。
   タイマー全画面時のみ純黒(省電力機能のため維持) */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  background: #fff;
  color: #333;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- 設定画面 ---------- */
#setup-screen {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 14px 40px;
}

#app-header {
  border-bottom: 2px solid #4a7dbd;
  padding-bottom: 10px;
  margin-bottom: 18px;
}
#app-header h1 { font-size: 1.5rem; color: #333; font-weight: 700; }
.subtitle { color: #777; font-size: 0.85rem; margin-top: 2px; }

#mode-tabs {
  display: flex;
  margin-bottom: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
}
.tab {
  flex: 1;
  padding: 11px 8px;
  font-size: 0.95rem;
  background: #f5f5f5;
  color: #555;
  border: none;
  border-right: 1px solid #ccc;
  cursor: pointer;
}
.tab:last-child { border-right: none; }
.tab.active {
  background: #4a7dbd;
  color: #fff;
  font-weight: 700;
}

#time-picker {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 16px 12px;
  margin-bottom: 14px;
  background: #fafafa;
}
.picker-row { display: flex; gap: 10px; justify-content: center; }
.picker-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
  max-width: 110px;
}
.picker-unit input {
  width: 100%;
  font-size: 1.8rem;
  text-align: center;
  background: #fff;
  color: #333;
  border: 1px solid #bbb;
  border-radius: 4px;
  padding: 6px 4px;
  font-variant-numeric: tabular-nums;
}
.picker-unit input:focus { outline: 2px solid #4a7dbd; }
.picker-unit label { color: #777; font-size: 0.8rem; }
.step-btn {
  width: 100%;
  padding: 7px;
  font-size: 1rem;
  background: #fff;
  color: #333;
  border: 1px solid #bbb;
  border-radius: 4px;
  cursor: pointer;
}
.step-btn:hover { background: #f0f0f0; }
.step-btn:active { background: #e4e4e4; }

#presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  justify-content: center;
}
.preset {
  padding: 7px 13px;
  background: #fff;
  color: #4a7dbd;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 0.88rem;
  cursor: pointer;
}
.preset:hover { background: #eef4fb; }

#repeat-options {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 14px 12px;
  margin-bottom: 14px;
  background: #fafafa;
}
.option-label { color: #555; font-size: 0.85rem; display: block; margin-bottom: 8px; font-weight: 700; }
#repeat-count-row { display: flex; gap: 6px; flex-wrap: wrap; }
.repeat-choice {
  flex: 1;
  min-width: 54px;
  padding: 9px 4px;
  background: #fff;
  color: #333;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
}
.repeat-choice.active {
  background: #4a7dbd;
  border-color: #4a7dbd;
  color: #fff;
  font-weight: 700;
}

#options {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 14px;
  margin-bottom: 16px;
}
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dotted #ddd;
  cursor: pointer;
  font-size: 0.9rem;
  color: #444;
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row input { width: 18px; height: 18px; accent-color: #4a7dbd; flex-shrink: 0; }

#start-btn {
  width: 100%;
  padding: 15px;
  font-size: 1.15rem;
  font-weight: 700;
  background: #4a7dbd;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
#start-btn:hover { background: #3d6ba7; }

/* ---------- 説明コンテンツ ---------- */
#seo-content { margin-top: 30px; }
.content-block {
  margin-bottom: 24px;
}
.content-block h2 {
  font-size: 1.1rem;
  color: #333;
  border-left: 4px solid #4a7dbd;
  padding-left: 10px;
  margin-bottom: 10px;
  font-weight: 700;
}
.content-block h3 {
  font-size: 0.98rem;
  color: #333;
  margin: 12px 0 4px;
  font-weight: 700;
}
.content-block p {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 8px;
}
.content-block strong { color: #333; }
.content-block ol, .content-block ul {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.8;
  padding-left: 1.5em;
  margin-bottom: 8px;
}
.usecase-list { list-style: none; padding-left: 0 !important; }
.usecase-list li {
  padding: 4px 0 4px 1.1em;
  position: relative;
}
.usecase-list li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: #4a7dbd;
}

#faq details {
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 6px;
  background: #fafafa;
}
#faq summary {
  cursor: pointer;
  color: #333;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 12px;
}
#faq details p {
  padding: 0 12px 10px;
  font-size: 0.88rem;
}

#site-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 14px;
  border-top: 1px solid #ddd;
  color: #999;
  font-size: 0.8rem;
}

/* ---------- タイマー全画面(純黒・省電力機能のため維持) ---------- */
#timer-screen {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#timer-tap-area {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

#time-display {
  color: #9a9a9a;
  font-size: clamp(4rem, 22vw, 12rem);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  user-select: none;
}
#time-display.minute-mode { font-size: clamp(3rem, 16vw, 9rem); }

#cycle-display {
  color: #555;
  font-size: 1.1rem;
  margin-bottom: 8px;
  user-select: none;
}

#eco-badge {
  color: #3a3a3a;
  font-size: 0.75rem;
  margin-top: 16px;
  user-select: none;
}

#progress-track {
  width: 60%;
  max-width: 400px;
  height: 2px;
  background: #1a1a1a;
  margin-top: 24px;
  border-radius: 1px;
}
#progress-bar {
  height: 100%;
  width: 0%;
  background: #4a4a4a;
  border-radius: 1px;
}

#controls {
  display: flex;
  gap: 16px;
  padding: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
#controls button {
  padding: 14px 32px;
  font-size: 1rem;
  background: #111;
  color: #999;
  border: 1px solid #333;
  border-radius: 6px;
  cursor: pointer;
}

#finish-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
}
#finish-message {
  color: #fff;
  font-size: 2.2rem;
  font-weight: 700;
}
#finish-ok-btn {
  padding: 16px 64px;
  font-size: 1.2rem;
  background: #4a7dbd;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

[hidden] { display: none !important; }
