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

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

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

h1 {
  font-size: 1.5rem;
  color: #2e7d32;
  margin-bottom: 20px;
  text-align: center;
}

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

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

.form-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.form-row input[type="text"] {
  flex: 2;
  min-width: 120px;
}

.form-row input[type="number"] {
  flex: 1;
  min-width: 80px;
}

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

input:focus {
  border-color: #4caf50;
}

button {
  padding: 10px 16px;
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

button:hover {
  background: #388e3c;
}

/* 植物一覧 */
.list-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.plant-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plant-card {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.plant-card.urgent {
  border-color: #e53935;
  background: #fff5f5;
}

.plant-card.today {
  border-color: #fb8c00;
  background: #fffdf5;
}

.plant-card.ok {
  border-color: #a5d6a7;
  background: #f5fff5;
}

.plant-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.plant-info {
  flex: 1;
  min-width: 0;
}

.plant-name {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-meta {
  font-size: 0.82rem;
  color: #777;
  margin-bottom: 4px;
}

.plant-status {
  font-size: 0.88rem;
  font-weight: bold;
}

.status-urgent { color: #e53935; }
.status-today  { color: #fb8c00; }
.status-ok     { color: #388e3c; }

.plant-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.btn-water {
  background: #1976d2;
  font-size: 0.85rem;
  padding: 8px 12px;
}

.btn-water:hover {
  background: #1565c0;
}

.btn-delete {
  background: #e0e0e0;
  color: #555;
  font-size: 0.85rem;
  padding: 8px 12px;
}

.btn-delete:hover {
  background: #bdbdbd;
}

.empty-msg {
  color: #aaa;
  text-align: center;
  padding: 20px 0;
  display: none;
}

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

  .plant-card {
    flex-wrap: wrap;
  }

  .plant-actions {
    flex-direction: row;
    width: 100%;
  }

  .plant-actions button {
    flex: 1;
  }
}
