* {
  box-sizing: border-box;
}
body {
  font-family: Arial, sans-serif;
  background: #f5f7fa;
  color: #333;
  margin: 0;
  padding: 20px;
}
.container {
  max-width: 480px;
  margin: auto;
}
h1 {
  text-align: center;
  margin-bottom: 1rem;
  color: #2c3e50;
}
.form-card,
.result-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 20px;
  margin-bottom: 1rem;
}
.form-row {
  margin-bottom: 1rem;
}
label {
  display: flex;
  flex-direction: column;
  font-weight: bold;
  font-size: 0.95rem;
}
input[type="number"] {
  margin-top: 4px;
  padding: 8px;
  border: 1px solid #ccd0d5;
  border-radius: 4px;
  font-size: 1rem;
}
.hint {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1rem;
}
.schedule-table table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}
.schedule-table th,
.schedule-table td {
  border: 1px solid #e1e4e8;
  padding: 8px;
  text-align: center;
}
.btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: #1976d2;
  color: #fff;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn:hover {
  background: #155ea8;
}
.result-card p {
  margin: 0.5rem 0;
  font-size: 1rem;
}
.result-card h2 {
  margin-top: 0;
  color: #1976d2;
}
.amort-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.amort-text {
  font-weight: bold;
  font-size: 0.95rem;
  user-select: none;
  cursor: default;
}
.amort-row input[type="checkbox"] {
  width: 1.2em;
  height: 1.2em;
  cursor: pointer;
}
.table-wrapper {
  overflow-x: auto;
  max-width: 100%;
}
.schedule-table {
  width: auto;
  table-layout: fixed;
  font-size: 0.75rem;
  white-space: nowrap;
  border-spacing: 2px;
}
.schedule-table input {
  width: 3rem;
  padding: 2px;
  font-size: 0.75rem;
}
.schedule-table th,
.schedule-table td {
  padding: 2px 4px;
  border: 1px solid #e1e4e8;
}


.schedule-table th:nth-child(1),
.schedule-table td:nth-child(1) { width: 2rem; }
.schedule-table th:nth-child(2),
.schedule-table td:nth-child(2) { width: 4rem; }
.schedule-table th:nth-child(3),
.schedule-table td:nth-child(3) { width: 4rem; }
.schedule-table th:nth-child(4),
.schedule-table td:nth-child(4) { width: 4rem; }
.schedule-table th:nth-child(5),
.schedule-table td:nth-child(5) { width: 2rem; }
