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

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

header {
  background: linear-gradient(135deg, #ffb3c6, #a8d8ea);
  padding: 16px 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

header h1 {
  font-size: 1.5rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

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

/* フォームセクション */
.form-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(255, 153, 180, 0.15);
}

.form-section h2 {
  font-size: 1rem;
  color: #e07a9b;
  margin-bottom: 14px;
  font-weight: 600;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="datetime-local"] {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #f0c8d8;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fffafc;
  transition: border-color 0.2s;
  color: #333;
}

.form-group input:focus {
  outline: none;
  border-color: #e07a9b;
}

/* 種別ボタン */
.type-buttons, .diaper-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.type-btn, .diaper-btn {
  flex: 1;
  min-width: 80px;
  padding: 9px 10px;
  border: 1.5px solid #f0c8d8;
  border-radius: 8px;
  background: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  color: #888;
}

.type-btn.active {
  background: #ffb3c6;
  border-color: #e07a9b;
  color: #fff;
  font-weight: 600;
}

.diaper-btn.active {
  background: #a8d8ea;
  border-color: #5ab4d0;
  color: #fff;
  font-weight: 600;
}

.type-btn:hover:not(.active),
.diaper-btn:hover:not(.active) {
  background: #fef0f5;
}

/* 追加ボタン */
.add-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #ffb3c6, #f48fb1);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 4px;
}

.add-btn:hover {
  opacity: 0.9;
}

/* フィルター */
.filter-section {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.filter-section label {
  font-size: 0.85rem;
  color: #888;
}

.filter-btn {
  padding: 6px 14px;
  border: 1.5px solid #f0c8d8;
  border-radius: 20px;
  background: #fff;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  color: #888;
}

.filter-btn.active {
  background: #ffb3c6;
  border-color: #e07a9b;
  color: #fff;
  font-weight: 600;
}

/* リストセクション */
.list-section h2 {
  font-size: 1rem;
  color: #e07a9b;
  margin-bottom: 12px;
  font-weight: 600;
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

/* レコードカード */
.record-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 6px rgba(255, 153, 180, 0.12);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-left: 4px solid #ffb3c6;
  position: relative;
}

.record-card[data-type="睡眠"] {
  border-left-color: #a8d8ea;
}

.record-card[data-type="おむつ"] {
  border-left-color: #c8e6c9;
}

.record-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.record-body {
  flex: 1;
  min-width: 0;
}

.record-type {
  font-weight: 700;
  font-size: 0.95rem;
  color: #444;
}

.record-datetime {
  font-size: 0.78rem;
  color: #aaa;
  margin-top: 2px;
}

.record-detail {
  font-size: 0.85rem;
  color: #666;
  margin-top: 4px;
}

.record-memo {
  font-size: 0.82rem;
  color: #999;
  margin-top: 3px;
  font-style: italic;
}

.delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #ddd;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.2s;
}

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

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

  .type-btn, .diaper-btn {
    min-width: 70px;
    font-size: 0.85rem;
  }
}
