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

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

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

header {
  text-align: center;
  padding: 20px 0 16px;
}

header h1 {
  font-size: 1.6rem;
  color: #2e7d32;
}

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

.form-section h2,
.list-section h2 {
  font-size: 1rem;
  color: #555;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8f5e9;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 0.85rem;
  color: #666;
  font-weight: 600;
}

.form-group input {
  padding: 10px 12px;
  border: 1.5px solid #c8e6c9;
  border-radius: 8px;
  font-size: 0.95rem;
  width: 100%;
  transition: border-color 0.2s;
}

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

.btn-add {
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
}

.btn-add:hover {
  background: #388e3c;
}

/* リストセクション */
.list-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

#cropCount {
  font-weight: bold;
  color: #4caf50;
}

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

/* 作物カード */
.crop-card {
  border: 1.5px solid #e8f5e9;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  position: relative;
  transition: box-shadow 0.2s;
}

.crop-card:hover {
  box-shadow: 0 2px 8px rgba(76,175,80,0.15);
}

.crop-card.harvest-ready {
  border-color: #ff8f00;
  background: #fff8e1;
}

.crop-card.harvest-over {
  border-color: #e53935;
  background: #fff5f5;
}

.crop-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: #2e7d32;
  margin-bottom: 6px;
}

.crop-card.harvest-ready .crop-name {
  color: #e65100;
}

.crop-card.harvest-over .crop-name {
  color: #c62828;
}

.crop-dates {
  font-size: 0.83rem;
  color: #666;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.crop-dates span {
  background: #f1f8e9;
  border-radius: 4px;
  padding: 2px 8px;
}

.crop-card.harvest-ready .crop-dates span,
.crop-card.harvest-over .crop-dates span {
  background: #fff3e0;
}

.crop-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.stat-badge {
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 20px;
  padding: 3px 12px;
  font-weight: 600;
}

.stat-badge.warn {
  background: #fff3e0;
  color: #e65100;
}

.stat-badge.danger {
  background: #ffebee;
  color: #c62828;
}

.harvest-label {
  font-size: 0.8rem;
  font-weight: bold;
  color: #fff;
  background: #e53935;
  border-radius: 4px;
  padding: 2px 8px;
  display: inline-block;
  margin-bottom: 6px;
}

.crop-memo {
  font-size: 0.82rem;
  color: #888;
  margin-bottom: 6px;
}

.btn-delete {
  background: none;
  border: 1.5px solid #e0e0e0;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 0.82rem;
  color: #999;
  cursor: pointer;
  float: right;
  transition: all 0.2s;
}

.btn-delete:hover {
  background: #ffebee;
  border-color: #e53935;
  color: #e53935;
}

@media (max-width: 480px) {
  .crop-stats {
    gap: 6px;
  }
}
