html, body, main, header, footer {
  padding: 0px;
  margin: 0px;
}

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

#page-title {
  text-align: center;
  font-size: 1.8rem;
  color: #1e293b;
  margin-bottom: 24px;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  padding: 24px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.2rem;
  color: #1e293b;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 6px;
  font-weight: 500;
}

.input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.input-wrapper:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-wrapper input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 12px;
  font-size: 1rem;
  color: #1e293b;
  min-width: 0;
}

.input-wrapper input::-webkit-inner-spin-button,
.input-wrapper input::-webkit-outer-spin-button {
  opacity: 1;
}

.unit {
  padding: 0 12px;
  color: #64748b;
  font-size: 0.9rem;
  background: #f1f5f9;
  line-height: 40px;
  white-space: nowrap;
}

.form-group select {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
  color: #1e293b;
  background: #ffffff;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.form-group select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 20px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

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

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.hint {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #ef4444;
  min-height: 20px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.summary-card {
  background: #f8fafc;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.summary-card.highlight-green {
  background: #f0fdf4;
  border-color: #86efac;
}

.summary-card.highlight-green .summary-value {
  color: #16a34a;
}

.summary-label {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 6px;
}

.summary-value {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
}

.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
}

.chart-wrapper canvas {
  width: 100%;
  height: 100%;
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

#plan-table thead th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  padding: 10px 8px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 2px solid #e2e8f0;
}

#plan-table thead th:first-child {
  text-align: center;
}

#plan-table tbody td {
  padding: 8px;
  text-align: right;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

#plan-table tbody td:first-child {
  text-align: center;
  font-weight: 500;
  color: #64748b;
}

#plan-table tbody tr.row-milestone {
  background: #eff6ff;
}

#plan-table tbody tr.row-milestone td:first-child {
  color: #2563eb;
  font-weight: 700;
}

#plan-note {
  color: #64748b;
  font-size: 0.85rem;
}

#__fork {
  text-align: center;
  margin: 24px 0;
}

#__fork button {
  padding: 10px 24px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #475569;
  cursor: pointer;
  transition: background 0.2s;
}

#__fork button:hover {
  background: #f8fafc;
}

#features, #scenarios, #FAQ {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px;
}

#features h2, #scenarios h2, #FAQ h2 {
  font-size: 1.2rem;
  color: #1e293b;
  margin-bottom: 12px;
}

#features p {
  color: #475569;
  line-height: 1.8;
}

#scenarios ul {
  padding-left: 20px;
}

#scenarios li {
  color: #475569;
  line-height: 1.8;
  margin-bottom: 4px;
}

#FAQ dl {
  margin: 0;
}

#FAQ dt {
  font-weight: 600;
  color: #1e293b;
  margin-top: 12px;
}

#FAQ dd {
  margin: 4px 0 12px 0;
  color: #475569;
  line-height: 1.7;
}

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

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  #page-title {
    font-size: 1.4rem;
  }

  .card {
    padding: 16px;
  }
}

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

  .summary-value {
    font-size: 1.1rem;
  }

  .container {
    padding: 12px 8px;
  }

  #plan-table {
    font-size: 0.8rem;
  }
}
