<style>
/* --- シミュレーター全体のスタイル --- */
.payback-simulator {
  border: 2px solid #4C9AE5;
  padding: 30px;
  border-radius: 16px;
  background-color: #FDFDF7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-shadow: 0 4px 12px rgba(76, 154, 229, 0.1);
  transition: all 0.3s ease;
}

/* --- プログレスバー --- */
.progress-bar-container {
  margin-bottom: 30px;
  position: relative;
}
.progress-bar {
  height: 8px;
  background-color: #E2DACC;
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(to right, #4C9AE5, #BDD0C9);
  width: 33%;
  transition: width 0.5s ease;
  border-radius: 4px;
}
.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}
.progress-step {
  font-size: 12px;
  color: #B9B2A8;
  font-weight: 500;
}
.progress-step.active {
  color: #4C9AE5;
  font-weight: bold;
}

/* --- セクションスタイル --- */
.simulator-section {
  margin-bottom: 30px;
  padding: 20px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.simulator-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.simulator-section h3 {
  margin: 0 0 15px 0;
  font-size: 20px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-number {
  display: inline-flex;
  width: 32px;
  height: 32px;
  background-color: #4C9AE5;
  color: white;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
}

/* --- 容量選択カード --- */
.capacity-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 15px;
}
.capacity-card {
  padding: 15px;
  border: 2px solid #E2DACC;
  border-radius: 12px;
  cursor: pointer;
  background-color: white;
  font-weight: bold;
  text-align: center;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.capacity-card:hover {
  border-color: #BDD0C9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.capacity-card.selected {
  border-color: #4C9AE5;
  background-color: #4C9AE5;
  color: white;
  transform: scale(1.05);
}
.capacity-card.selected::after {
  content: "✓";
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 18px;
}

/* --- 入力要素のスタイル --- */
.input-group {
  margin-top: 20px;
}
.input-label {
  font-weight: bold;
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-size: 16px;
}
.input-field, .select-field {
  padding: 12px 16px;
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
  border: 2px solid #E2DACC;
  background-color: white;
  box-sizing: border-box;
  font-size: 16px;
  transition: all 0.2s ease;
}
.select-field {
  height: auto;
  min-height: 48px;
  line-height: 1.5;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 45px;
}
.select-field option {
  padding: 8px 12px;
  line-height: 1.5;
  font-size: 16px;
}
.select-field optgroup {
  font-weight: bold;
  font-size: 16px;
  padding: 5px 0;
}
.input-field:focus, .select-field:focus {
  border-color: #4C9AE5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 154, 229, 0.1);
}
.input-helper {
  font-size: 12px;
  color: #B9B2A8;
  margin-top: 5px;
}

/* --- ラジオボタンのカスタマイズ --- */
.radio-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.radio-card {
  flex: 1;
  min-width: 200px;
  padding: 15px;
  border: 2px solid #E2DACC;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: white;
  position: relative;
}
.radio-card:hover {
  border-color: #BDD0C9;
  transform: translateY(-2px);
}
.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}
.radio-card.selected {
  border-color: #BDD0C9;
  background-color: #BDD0C9;
}
.radio-card-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 5px;
  color: #333;
}
.radio-card-desc {
  font-size: 13px;
  color: #666;
}

/* --- ボタンのスタイル --- */
.calc-button {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 30px auto;
  padding: 18px;
  background: linear-gradient(135deg, #4C9AE5, #BDD0C9);
  color: white;
  font-size: 18px;
  font-weight: bold;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 154, 229, 0.3);
  position: relative;
  overflow: hidden;
}
.calc-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 154, 229, 0.4);
}
.calc-button:active {
  transform: translateY(0);
}
.calc-button::after {
  content: "→";
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  transition: transform 0.3s ease;
}
.calc-button:hover::after {
  transform: translateY(-50%) translateX(5px);
}

/* --- 結果表示エリア --- */
.result-area {
  margin-top: 30px;
  padding: 30px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FDFDF7, white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  display: none;
  animation: slideIn 0.5s ease;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.result-header {
  text-align: center;
  margin-bottom: 25px;
}
.result-header h3 {
  color: #D97757;
  font-size: 24px;
  margin: 0;
}

/* --- 回収期間の表示 --- */
.payback-display {
  background: linear-gradient(135deg, #D97757, #E89B7F);
  color: white;
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 25px;
  box-shadow: 0 6px 20px rgba(217, 119, 87, 0.3);
}
.payback-title {
  font-size: 18px;
  margin-bottom: 10px;
  opacity: 0.9;
}
.payback-time {
  font-size: 48px;
  font-weight: bold;
  margin: 10px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}
.payback-subtitle {
  font-size: 14px;
  opacity: 0.8;
}

/* --- 節約額の内訳 --- */
.savings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}
.saving-card {
  background-color: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.saving-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.saving-label {
  font-size: 13px;
  color: #B9B2A8;
  margin-bottom: 5px;
}
.saving-amount {
  font-size: 24px;
  font-weight: bold;
  color: #4C9AE5;
}

/* --- 詳細情報 --- */
.result-details {
  background-color: #CBC9DB;
  padding: 20px;
  border-radius: 12px;
  margin-top: 20px;
}
.result-details h4 {
  margin: 0 0 15px 0;
  color: #333;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
.detail-row:last-child {
  border-bottom: none;
}

/* --- 注意事項 --- */
.result-notes {
  margin-top: 20px;
  padding: 15px;
  background-color: #E2DACC;
  border-radius: 8px;
  font-size: 12px;
  color: #666;
  line-height: 1.6;
}

/* --- レスポンシブ対応 --- */
@media (max-width: 768px) {
  .payback-simulator {
    padding: 20px;
  }
  .capacity-cards {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
  .radio-group {
    flex-direction: column;
  }
  .radio-card {
    min-width: auto;
  }
  .payback-time {
    font-size: 36px;
  }
  .saving-amount {
    font-size: 20px;
  }
}

/* --- エラー表示 --- */
.error-message {
  color: #D97757;
  font-size: 13px;
  margin-top: 5px;
  display: none;
}
.input-field.error {
  border-color: #D97757;
}

/* --- ツールチップ --- */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}
.tooltip-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  background-color: #B9B2A8;
  color: white;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-left: 5px;
}
.tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: #333;
  color: white;
  text-align: center;
  padding: 8px;
  border-radius: 6px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
}
.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 0.95;
}
</style>