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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

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

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 20px;
}

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

.card h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f0f0;
}

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

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

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

.form-group input:focus {
  border-color: #4a90e2;
}

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

.btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  background: #4a90e2;
  color: #fff;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 20px;
}

.btn-primary:hover {
  background: #3a7bd5;
}

.btn-primary:active {
  background: #2d6dc0;
}

.results {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.results h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f0f0;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .result-grid {
    grid-template-columns: 1fr;
  }
}

.result-card {
  border-radius: 9px;
  padding: 14px;
  border-top: 4px solid #ccc;
}

.scenario-keep {
  border-top-color: #888;
  background: #fafafa;
}

.scenario-up {
  border-top-color: #e25c4a;
  background: #fff8f7;
}

.scenario-down {
  border-top-color: #e2a04a;
  background: #fffbf5;
}

.scenario-label {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.scenario-keep .scenario-label { color: #555; }
.scenario-up .scenario-label { color: #c0392b; }
.scenario-down .scenario-label { color: #b07d1a; }

.scenario-desc {
  font-size: 0.78rem;
  color: #999;
  margin-bottom: 10px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  padding: 5px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.result-row:last-child {
  border-bottom: none;
}

.result-row span:first-child {
  color: #666;
}

.result-row span:last-child {
  font-weight: 600;
  color: #333;
}

.result-row.highlight {
  background: rgba(0,0,0,0.03);
  margin: 4px -4px;
  padding: 6px 4px;
  border-radius: 5px;
  border-bottom: none;
}

.result-row.highlight span:last-child {
  font-size: 1.05rem;
  color: #1a1a1a;
}

.result-row.diff-row span:last-child {
  color: #4a90e2;
}

.diff-positive { color: #27ae60 !important; }
.diff-negative { color: #e74c3c !important; }

.recommendation {
  background: #f0f7ff;
  border-left: 4px solid #4a90e2;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #2c5282;
  line-height: 1.7;
}

.hidden {
  display: none;
}
