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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Meiryo", sans-serif;
  background: #f5f7fa;
  color: #333;
  min-height: 100vh;
}

header {
  background: #4a90d9;
  color: #fff;
  padding: 20px 16px 16px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

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

.subtitle {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-bottom: 10px;
}

.progress-bar-wrap {
  background: rgba(255,255,255,0.3);
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
  margin: 0 auto 6px;
  max-width: 400px;
}

.progress-bar {
  height: 100%;
  background: #fff;
  border-radius: 6px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.reset-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
}

.reset-btn:hover {
  background: rgba(255,255,255,0.35);
}

main {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 12px 40px;
}

.category {
  background: #fff;
  border-radius: 10px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  overflow: hidden;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #eef4fb;
  border-bottom: 1px solid #dce9f5;
  cursor: pointer;
  user-select: none;
}

.category-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2c6aa0;
}

.category-count {
  font-size: 0.78rem;
  color: #5a8cc4;
  background: #d6e8f8;
  padding: 2px 8px;
  border-radius: 10px;
}

.category-body {
  padding: 4px 0;
}

.item {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.15s;
  gap: 12px;
}

.item:last-child {
  border-bottom: none;
}

.item:hover {
  background: #f8fbff;
}

.item.done {
  background: #f0faf0;
}

.checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid #b0c8e0;
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}

.item.done .checkbox {
  background: #4caf50;
  border-color: #4caf50;
}

.checkbox-icon {
  display: none;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.item.done .checkbox-icon {
  display: block;
}

.item-label {
  font-size: 0.9rem;
  line-height: 1.4;
  flex: 1;
  color: #333;
}

.item.done .item-label {
  color: #888;
  text-decoration: line-through;
}

.item-note {
  font-size: 0.75rem;
  color: #888;
  margin-top: 2px;
}

.item.done .item-note {
  color: #aaa;
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.2rem;
  }

  .item {
    padding: 10px 12px;
    gap: 10px;
  }

  .item-label {
    font-size: 0.85rem;
  }
}
