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

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

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

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

.subtitle {
  text-align: center;
  color: #777;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

h2 {
  font-size: 1rem;
  color: #2e7d32;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #c8e6c9;
}

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

.input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.input-row .input-group {
  flex: 1;
}

.times {
  font-size: 1.4rem;
  color: #555;
  padding-bottom: 8px;
  flex-shrink: 0;
}

.input-group {
  margin-bottom: 8px;
}

.input-group label {
  display: block;
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 4px;
}

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

.input-group input:focus {
  outline: none;
  border-color: #2e7d32;
}

.hint {
  font-size: 0.75rem;
  color: #999;
  margin-top: 4px;
}

.area-display {
  font-size: 0.9rem;
  color: #2e7d32;
  font-weight: bold;
  text-align: right;
  min-height: 1.2em;
}

.calc-btn {
  width: 100%;
  padding: 14px;
  background: #2e7d32;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 16px;
  transition: background 0.2s;
}

.calc-btn:hover {
  background: #1b5e20;
}

.result-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border-left: 4px solid #2e7d32;
}

.result-card h2 {
  color: #2e7d32;
}

.result-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.result-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 12px;
  background: #f9f9f9;
  border-radius: 6px;
}

.result-item.highlight {
  background: #e8f5e9;
}

.result-item.highlight-main {
  background: #2e7d32;
  color: #fff;
}

.result-label {
  font-size: 0.82rem;
  flex: 1;
  color: inherit;
}

.result-value {
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1;
}

.result-unit {
  font-size: 0.82rem;
  color: inherit;
  opacity: 0.8;
}

.save-btn {
  width: 100%;
  padding: 10px;
  background: #fff;
  color: #2e7d32;
  border: 2px solid #2e7d32;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.save-btn:hover {
  background: #2e7d32;
  color: #fff;
}

.history-list {
  list-style: none;
  margin-bottom: 12px;
}

.empty-msg {
  color: #aaa;
  font-size: 0.85rem;
  text-align: center;
  padding: 12px;
}

.history-item {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.85rem;
}

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

.history-item .hi-main {
  font-weight: bold;
  color: #2e7d32;
  font-size: 0.95rem;
}

.history-item .hi-sub {
  color: #777;
  margin-top: 2px;
}

.history-item .hi-date {
  color: #bbb;
  font-size: 0.75rem;
  margin-top: 2px;
}

.clear-btn {
  width: 100%;
  padding: 8px;
  background: #fff;
  color: #e53935;
  border: 1px solid #e53935;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.clear-btn:hover {
  background: #e53935;
  color: #fff;
}

@media (max-width: 400px) {
  h1 {
    font-size: 1.2rem;
  }
  .result-value {
    font-size: 1.3rem;
  }
}
