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

#app {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

#calc-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a73e8;
  margin: 0 0 20px 0;
}

.loan-section {
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.provident-section {
  background: #f0f5ff;
  border: 1px solid #d6e4ff;
}

.commercial-section {
  background: #f8f9fa;
  border: 1px solid #e8eaed;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 14px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8edf5;
}

.provident-section .section-title {
  color: #1a73e8;
  border-bottom-color: #c8d8f0;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.input-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  min-width: 60px;
}

.input-field {
  flex: 1;
  padding: 9px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: Consolas, "Courier New", monospace;
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}

.input-field:focus {
  border-color: #1a73e8;
}

.input-field.error {
  border-color: #d93025;
}

.unit-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
  white-space: nowrap;
  min-width: 36px;
}

.sub-result-area {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #dde;
}

.sub-result-item {
  flex: 1;
  text-align: center;
  padding: 8px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #eee;
}

.sub-result-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #999;
  margin-bottom: 4px;
}

.sub-result-value {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a73e8;
  font-family: Consolas, "Courier New", monospace;
  word-break: break-all;
}

.sub-result-value.interest-value {
  font-size: 1.1rem;
  color: #e67e22;
}

.sub-result-unit {
  font-size: 0.75rem;
  color: #aaa;
}

.combined-result-area {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #1a73e8, #1557b0);
  border-radius: 10px;
  padding: 16px;
}

.combined-result-item {
  flex: 1;
  text-align: center;
  padding: 8px;
}

.combined-result-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 4px;
}

.combined-result-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  font-family: Consolas, "Courier New", monospace;
  word-break: break-all;
}

.combined-result-value.interest-value {
  font-size: 1.3rem;
}

.combined-result-unit {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
}

.error-text {
  color: #d93025;
  font-size: 0.85rem;
  min-height: 20px;
  text-align: center;
  margin-bottom: 4px;
}

.action-row {
  display: flex;
  gap: 10px;
}

.primary-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background: #1a73e8;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  min-height: 44px;
}

.primary-btn:hover {
  background: #1557b0;
}

.secondary-btn {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #555;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

.secondary-btn:hover {
  border-color: #1a73e8;
  color: #1a73e8;
}

.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
}

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

#features h2, #scenarios h2, #FAQ h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 8px 0;
}

#features p, #scenarios li, #FAQ dd {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.7;
}

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

#scenarios li {
  margin-bottom: 8px;
}

#FAQ dl {
  margin: 0;
}

#FAQ dt {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin-top: 12px;
}

#FAQ dd {
  margin: 4px 0 0 0;
}

#__fork {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 16px;
  text-align: center;
}

@media (max-width: 768px) {
  #app {
    padding: 12px;
    gap: 12px;
  }

  .card {
    padding: 16px;
    border-radius: 8px;
  }

  #calc-title {
    font-size: 1.3rem;
    margin-bottom: 16px;
  }

  .loan-section {
    padding: 12px;
  }

  .combined-result-value {
    font-size: 1.3rem;
  }

  .combined-result-value.interest-value {
    font-size: 1.1rem;
  }

  .sub-result-value {
    font-size: 1.1rem;
  }

  .action-row {
    gap: 8px;
  }

  .primary-btn, .secondary-btn {
    padding: 10px 12px;
    font-size: 0.95rem;
  }
}
