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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f0f4f8;
  color: #1a202c;
  line-height: 1.6;
  padding: 16px;
}

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

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: #1e3a5f;
  margin-bottom: 4px;
}

.subtitle {
  text-align: center;
  color: #5a7a9a;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

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

.card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

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

.input-group label {
  display: block;
  font-size: 0.82rem;
  color: #4a5568;
  margin-bottom: 4px;
  font-weight: 600;
}

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

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

.total-display {
  margin-top: 16px;
  padding: 10px 14px;
  background: #eff6ff;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1e40af;
}

.total-display strong {
  font-size: 1.1rem;
}

.note {
  font-size: 0.75rem;
  color: #718096;
  margin-top: 6px;
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: #e2e8f0;
  color: #4a5568;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #cbd5e0;
}

.result-section {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.result-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 20px;
}

.hidden {
  display: none;
}

.result-grid {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 480px) {
  .result-grid {
    flex-direction: column;
  }
}

.result-box {
  flex: 1;
  background: #f7fafc;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  border: 2px solid #e2e8f0;
}

.result-box.winner {
  border-color: #22c55e;
  background: #f0fdf4;
}

.result-label {
  font-size: 0.82rem;
  color: #4a5568;
  margin-bottom: 8px;
  font-weight: 600;
}

.result-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e3a5f;
}

.vs-badge {
  font-size: 1.2rem;
  font-weight: 900;
  color: #718096;
  padding: 0 4px;
  flex-shrink: 0;
}

.judgement {
  padding: 16px 20px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.7;
}

.judgement.hire-better {
  background: #fef9c3;
  color: #854d0e;
  border: 2px solid #fde047;
}

.judgement.wage-better {
  background: #dcfce7;
  color: #14532d;
  border: 2px solid #4ade80;
}

.judgement.equal {
  background: #e0f2fe;
  color: #075985;
  border: 2px solid #38bdf8;
}

.detail-box {
  background: #f7fafc;
  border-radius: 8px;
  padding: 16px;
}

.detail-box h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #4a5568;
  margin-bottom: 10px;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.detail-table tr {
  border-bottom: 1px solid #e2e8f0;
}

.detail-table tr:last-child {
  border-bottom: none;
}

.detail-table td {
  padding: 6px 4px;
  color: #4a5568;
}

.detail-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: #1a202c;
}
