/* ===== ローン計算ツール スタイル（jimusho-suggest準拠） ===== */
#lct-root *, #lct-root *::before, #lct-root *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}
#lct-root {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', sans-serif;
  color: #333;
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.10);
  overflow: hidden;
}

/* ===== ヘッダー ===== */
#lct-root .lct-header {
  background: linear-gradient(135deg, #1a6fc4 0%, #0d4f91 100%);
  color: #fff;
  padding: 20px 24px 16px;
}
#lct-root .lct-header h2 {
  font-size: 17px;
  font-weight: bold;
  margin-bottom: 4px;
  line-height: 1.4;
}
#lct-root .lct-header p {
  font-size: 13px;
  opacity: .85;
}

/* ===== フォーム入力エリア ===== */
#lct-root .lct-form-area {
  padding: 22px 24px;
  border-bottom: 1px solid #e8ecf0;
}

#lct-root .lct-loans-container {
  margin-bottom: 16px;
}

#lct-root .lct-loan-card {
  background: #f8fafc;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
}

#lct-root .lct-loan-card h4 {
  font-size: 13px;
  font-weight: bold;
  color: #1a6fc4;
  margin-bottom: 12px;
}

#lct-root .lct-loan-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

#lct-root .lct-loan-row.full {
  grid-template-columns: 1fr;
}

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

#lct-root .lct-form-group label {
  font-size: 12px;
  font-weight: bold;
  color: #555;
  margin-bottom: 4px;
}

#lct-root .lct-form-group input,
#lct-root .lct-form-group select {
  padding: 9px 10px;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}

#lct-root .lct-form-group input:focus,
#lct-root .lct-form-group select:focus {
  outline: none;
  border-color: #1a6fc4;
  box-shadow: 0 0 0 3px rgba(26, 111, 196, 0.1);
}

#lct-root .lct-remove-loan-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #ff6b6b;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  transition: background .18s;
}

#lct-root .lct-remove-loan-btn:hover {
  background: #d63031;
}

#lct-root .lct-add-loan-btn {
  width: 100%;
  padding: 11px;
  background: #f0f6ff;
  color: #1a6fc4;
  border: 2px dashed #1a6fc4;
  border-radius: 8px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: all .18s;
}

#lct-root .lct-add-loan-btn:hover {
  background: #e8f1fc;
}

#lct-root .lct-add-loan-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== 計算ボタン ===== */
#lct-root .lct-calc-btn-wrap {
  padding: 12px 24px;
  background: #f8fafc;
}

#lct-root .lct-calc-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #1a6fc4 0%, #155aa0 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: all .18s;
}

#lct-root .lct-calc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 111, 196, 0.3);
}

#lct-root .lct-calc-btn:disabled {
  background: #b0c4d8;
  cursor: not-allowed;
  transform: none;
}

/* ===== グラフエリア ===== */
#lct-root .lct-graph-area {
  padding: 24px;
  border-bottom: 1px solid #e8ecf0;
}

#lct-root .lct-graph-area h3 {
  font-size: 14px;
  font-weight: bold;
  color: #1a6fc4;
  margin-bottom: 16px;
}

#lct-root .lct-graph-wrapper {
  position: relative;
  height: 300px;
  background: #f8fafc;
  border-radius: 8px;
  padding: 16px;
}

#lct-root .lct-graph-wrapper canvas {
  max-height: 300px;
}

/* ===== 結果エリア ===== */
#lct-root .lct-result-area {
  padding: 24px;
}

#lct-root .lct-result-area h3 {
  font-size: 14px;
  font-weight: bold;
  color: #1a6fc4;
  margin: 20px 0 12px;
}

#lct-root .lct-result-area h3:first-child {
  margin-top: 0;
}

/* ===== 返済計画サマリー ===== */
#lct-root .lct-result-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: #f0f6ff;
  border-radius: 8px;
}

#lct-root .lct-summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#lct-root .lct-summary-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

#lct-root .lct-summary-value {
  font-size: 18px;
  font-weight: bold;
  color: #1a6fc4;
}

/* ===== 返済計画表 ===== */
#lct-root .lct-table-wrapper {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  margin-bottom: 16px;
}

#lct-root .lct-repayment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

#lct-root .lct-repayment-table thead {
  position: sticky;
  top: 0;
  background: #e8f1fc;
  z-index: 10;
}

#lct-root .lct-repayment-table th {
  padding: 10px 8px;
  text-align: right;
  font-weight: bold;
  color: #1a6fc4;
  border-bottom: 1px solid #dde3ea;
}

#lct-root .lct-repayment-table th:first-child {
  text-align: left;
}

#lct-root .lct-repayment-table td {
  padding: 8px;
  text-align: right;
  border-bottom: 1px solid #e8ecf0;
}

#lct-root .lct-repayment-table td:first-child {
  text-align: left;
  color: #555;
}

#lct-root .lct-repayment-table tbody tr:hover {
  background: #f8fafc;
}

/* ===== 出力ボタン ===== */
#lct-root .lct-export-area {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}

#lct-root .lct-export-btn {
  padding: 11px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all .18s;
}

#lct-root .lct-export-csv {
  background: #1a6fc4;
  color: #fff;
}

#lct-root .lct-export-csv:hover {
  background: #155aa0;
}

#lct-root .lct-export-pdf {
  background: #ff6b6b;
  color: #fff;
}

#lct-root .lct-export-pdf:hover {
  background: #d63031;
}

#lct-root .lct-export-retry {
  background: #6c757d;
  color: #fff;
}

#lct-root .lct-export-retry:hover {
  background: #5a6268;
}

/* ===== 関連記事 ===== */
#lct-root .lct-related-articles {
  margin-top: 24px;
  padding: 16px;
  background: #fffbf0;
  border-left: 4px solid #f0a500;
  border-radius: 4px;
}

#lct-root .lct-related-articles h3 {
  font-size: 13px;
  color: #f0a500;
  margin: 0 0 10px;
}

#lct-root .lct-related-articles ul {
  list-style: none;
  margin: 0;
}

#lct-root .lct-related-articles li {
  margin-bottom: 16px;
}

#lct-root .lct-related-articles a {
  color: #1a6fc4;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  display: block;
  margin-bottom: 6px;
}

#lct-root .lct-related-articles a:hover {
  text-decoration: underline;
}

#lct-root .lct-related-articles p {
  font-size: 12px;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

/* ===== レスポンシブ ===== */
@media (max-width: 640px) {
  #lct-root {
    border-radius: 0;
    box-shadow: none;
  }
  #lct-root .lct-header {
    padding: 16px;
  }
  #lct-root .lct-header h2 {
    font-size: 15px;
  }
  #lct-root .lct-loan-row {
    grid-template-columns: 1fr;
  }
  #lct-root .lct-export-area {
    grid-template-columns: 1fr;
  }
  #lct-root .lct-result-summary {
    grid-template-columns: 1fr;
  }
}
