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

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

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

h1 {
  text-align: center;
  font-size: 1.6rem;
  color: #27ae60;
  margin-bottom: 20px;
  padding: 16px 0 12px;
  border-bottom: 3px solid #27ae60;
}

h2 {
  font-size: 1rem;
  color: #555;
  margin-bottom: 12px;
}

/* フォーム */
.form-section {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  margin-bottom: 16px;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 4px;
}

.form-group input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: #27ae60;
}

.btn-primary {
  width: 100%;
  padding: 11px;
  background: #27ae60;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #219a52;
}

/* フィルター */
.filter-section {
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-section label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #444;
  white-space: nowrap;
}

.filter-section select {
  padding: 7px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  outline: none;
  flex: 1;
  min-width: 160px;
}

/* テーブルセクション */
.table-section {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

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

/* 項目グループ */
.item-group {
  margin-bottom: 20px;
}

.item-group-title {
  font-size: 1rem;
  font-weight: 700;
  color: #27ae60;
  padding: 6px 10px;
  background: #eafaf1;
  border-left: 4px solid #27ae60;
  border-radius: 4px;
  margin-bottom: 8px;
}

/* テーブル */
.record-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.record-table th {
  background: #f0f0f0;
  padding: 8px 10px;
  text-align: left;
  font-size: 0.82rem;
  color: #555;
  border-bottom: 2px solid #ddd;
}

.record-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.record-table tr:last-child td {
  border-bottom: none;
}

.record-table tr:hover td {
  background: #fafff9;
}

/* 前回比 */
.diff-up {
  color: #e74c3c;
  font-weight: 600;
}

.diff-down {
  color: #2980b9;
  font-weight: 600;
}

.diff-none {
  color: #27ae60;
  font-weight: 600;
}

.diff-na {
  color: #aaa;
  font-size: 0.85rem;
}

/* 削除ボタン */
.btn-delete {
  background: none;
  border: 1px solid #e74c3c;
  color: #e74c3c;
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-delete:hover {
  background: #e74c3c;
  color: #fff;
}

/* レスポンシブ */
@media (max-width: 600px) {
  .record-table th:nth-child(4),
  .record-table td:nth-child(4) {
    display: none;
  }
}

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