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

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

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

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

.subtitle {
  text-align: center;
  font-size: 0.82rem;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.5;
}

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

.card h2 {
  font-size: 0.95rem;
  color: #e67e22;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #fdebd0;
}

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

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

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

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

.btn-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

button {
  flex: 1;
  padding: 13px;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

button:active {
  opacity: 0.75;
}

#calcBtn {
  background: #e67e22;
  color: #fff;
}

button.secondary {
  background: #eee;
  color: #555;
}

.result-card {
  border-left: 4px solid #e67e22;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.result-label {
  font-size: 0.9rem;
  color: #555;
}

.result-value {
  font-size: 1.3rem;
  font-weight: bold;
  color: #c0392b;
}

.secondary-val {
  font-size: 1.1rem;
  color: #e67e22;
}

.result-sub {
  background: #fdf6ec;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 4px 0 10px;
}

.sub-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 3px 0;
  color: #666;
}

.sub-item span:last-child {
  font-weight: 600;
  color: #333;
}

hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 8px 0;
}

.result-note {
  font-size: 0.78rem;
  color: #888;
  margin-top: 8px;
  line-height: 1.5;
}

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