body {
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans JP", sans-serif;
  margin: 0;
  padding: 0;
  background: #f7f7f7;
  color: #222;
  display: flex;
  justify-content: center;
}

.container {
  width: 95%;
  max-width: 420px;
  background: #fff;
  border-radius: 14px;
  padding: 20px 18px 28px;
  margin: 24px auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

h2 {
  margin-bottom: 0.8em;
  font-size: 1.1rem;
  text-align: center;
}

label {
  display: block;
  margin-top: 1.2em;
  font-weight: 600;
  font-size: 0.9rem;
  color: #444;
}

textarea,
input[type=text],
input[type=date] {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
  background: #fcfcfc;
}

button {
  font-family: inherit;
  cursor: pointer;
  background: #666;
  color: #222;
}

/* === スプレッドシート設定まわり === */
.sheet-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.sheet-btn-row button {
  flex: 1;
  padding: 8px 0;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #f7f7f7;
  font-size: 0.85rem;
}

.sheet-btn-row button:hover {
  background: #eee;
}

.sheet-message {
  margin-top: 0.3em;
  font-size: 0.8rem;
  min-height: 1.2em;
}

/* === タブ === */
.tab-bar {
  display: flex;
  margin-top: 16px;
  border-radius: 999px;
  background: #f2f2f2;
  padding: 4px;
  gap: 4px;
}

.tab-button {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 6px 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.tab-button.active {
  background: #666;
  color: #fff;
}

.tab-content {
  margin-top: 12px;
  display: none;
}

.tab-content.active {
  display: block;
}

/* === MoodBottle（時報） === */
.mood-card {
  background: #fdfdfd;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 10px 10px 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  margin-top: 0.8em;
}

.mood-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  justify-items: center;
  margin-top: 6px;
}

.mood {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease, outline 0.1s ease;
}
.mood.selected {
  outline: 2px solid #555;
  transform: scale(1.12);
}

.mood-gear {
  background: #f5f5f5;
  color: #666;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mood-gear:hover {
  background: #eaeaea;
}

/* 折りたたみ式スライダー */
.adjuster {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #ddd;
  display: none;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn 0.3s ease;
}
.adjuster.open {
  display: flex;
}
.adjuster label {
  font-weight: 500;
  font-size: 0.85rem;
  color: #555;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === スライダー（HP/MP） === */
.range-group {
  margin-top: 1.2em;
}

.range-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.range-value {
  font-size: 0.85rem;
  color: #555;
}

input[type=range] {
  width: 100%;
  margin-top: 4px;
}

/* === ボタン / メッセージ === */
#dailySaveBtn,
#hourlySaveBtn {
  margin-top: 1.2em;
  width: 100%;
  padding: 10px 0;
  border-radius: 10px;
  border: none;
  background: #666;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

.small {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.2em;
}

#message {
  margin-top: 0.8em;
  font-size: 0.9rem;
  text-align: center;
  color: #333;
}

/* === スマホ向け微調整 === */
@media (min-width: 640px) {
  .container {
    max-width: 480px;
  }
}

/* =========================================
   ふんわり淡色スライダー（input[type=range]）
========================================= */

/* 全体 */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: #eaeaea;       /* ← レールの色（淡グレー） */
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

/* Chrome / Edge / Safari のつまみ */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #bbbbbb;      /* ← つまみの色（濃すぎないグレー） */
  border-radius: 50%;
  border: 2px solid #ffffff; /* ← 白縁でふんわり */
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: background 0.2s ease, transform 0.1s ease;
}

/* ホバー時 */
input[type="range"]::-webkit-slider-thumb:hover {
  background: #999999;
  transform: scale(1.1);
}

/* Firefox 用 */
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #bbbbbb;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Firefox のレール */
input[type="range"]::-moz-range-track {
  background: #eaeaea;
  height: 6px;
  border-radius: 4px;
}

/* === iOSメモ書き出しボタン === */
.export-btn {
  margin-top: 12px;
  width: 100%;
  padding: 10px 0;
  border-radius: 10px;
  border: none;
  background: #ffd86b;
  color: #444;
  font-weight: 600;
  font-size: 0.95rem;
}
.export-btn:hover {
  background: #ffcc55;
}
