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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f0f4f8;
  color: #333;
  min-height: 100vh;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 0 40px;
}

header {
  background: #4a8fe8;
  color: #fff;
  padding: 20px 16px 14px;
  text-align: center;
}

header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.today-label {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* 曜日タブ */
.day-tabs {
  display: flex;
  background: #3a7fd6;
}

.tab-btn {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.tab-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.tab-btn.active {
  background: #fff;
  color: #4a8fe8;
}

.tab-btn.today-tab {
  position: relative;
}

.tab-btn.today-tab::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: #ffcc00;
  border-radius: 50%;
}

.tab-btn.active.today-tab::after {
  background: #4a8fe8;
}

/* メイン */
main {
  padding: 16px;
}

.progress-bar-wrap {
  background: #dde4ef;
  border-radius: 8px;
  height: 8px;
  margin-bottom: 6px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: #4a8fe8;
  border-radius: 8px;
  width: 0%;
  transition: width 0.3s;
}

.progress-text {
  font-size: 0.8rem;
  color: #666;
  text-align: right;
  margin-bottom: 14px;
}

.input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.input-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #c5d0e0;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-row input:focus {
  border-color: #4a8fe8;
}

.input-row button {
  padding: 10px 18px;
  background: #4a8fe8;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.input-row button:hover {
  background: #3a7fd6;
}

/* リスト */
.item-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.item-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #dde4ef;
  border-radius: 10px;
  padding: 12px 14px;
  transition: opacity 0.2s;
}

.item-list li.checked {
  opacity: 0.55;
}

.item-list li.checked .item-name {
  text-decoration: line-through;
  color: #999;
}

.check-box {
  width: 22px;
  height: 22px;
  border: 2px solid #c5d0e0;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.check-box.checked {
  background: #4a8fe8;
  border-color: #4a8fe8;
}

.check-box.checked::after {
  content: '✓';
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.item-name {
  flex: 1;
  font-size: 1rem;
}

.delete-btn {
  background: none;
  border: none;
  color: #bbb;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s;
  line-height: 1;
}

.delete-btn:hover {
  color: #e05a5a;
}

.empty-msg {
  text-align: center;
  color: #aaa;
  font-size: 0.9rem;
  padding: 24px 0;
}

/* リセットボタン */
.actions {
  text-align: center;
}

.reset-btn {
  padding: 9px 20px;
  background: #fff;
  border: 1px solid #c5d0e0;
  border-radius: 8px;
  color: #666;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}

.reset-btn:hover {
  background: #f0f4f8;
}

@media (max-width: 375px) {
  header h1 { font-size: 1.2rem; }
  .tab-btn { font-size: 0.82rem; padding: 8px 0; }
}
