/* ============================================
   DPA コスパ計算機 — スタイル
   既存の --accent / --text / --surface 等の
   CSS変数（css/style.css）を利用
   ============================================ */

.dpa-calculator {
  padding-top: 24px;
  padding-bottom: 40px;
}

.dpa-header {
  margin: 16px 0 28px;
}

.dpa-header .page-title {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: 0.01em;
}

.dpa-subtitle {
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.7;
  max-width: 760px;
}

.calc-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 28px;
  margin-bottom: 40px;
}

@media (max-width: 1024px) {
  .calc-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ============================================
   入力パネル
   ============================================ */

.calc-input-panel,
.calc-result-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.calc-input-panel h2,
.calc-result-panel h2 {
  font-size: 1.1rem;
  margin: 0 0 20px;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.form-group {
  margin-bottom: 18px;
}

.form-group > label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.form-help {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ラジオボタン */
.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: background 0.2s, border-color 0.2s;
  font-size: 0.9rem;
}

.radio-label:hover {
  background: var(--accent-soft);
}

.radio-label input[type="radio"] {
  margin-right: 8px;
  accent-color: var(--accent);
}

.radio-label input[type="radio"]:checked + .radio-text {
  color: var(--accent);
  font-weight: 600;
}

/* DPA 価格表示 */
.price-display {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-radius: 8px;
}

.price-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.price-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 時給入力 */
.input-with-unit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-with-unit .form-control {
  flex: 1;
}

.input-with-unit .unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.rate-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.preset-btn {
  padding: 7px 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-sub);
  font-family: inherit;
}

.preset-btn:hover,
.preset-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* ボタン */
.btn {
  padding: 11px 18px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  box-sizing: border-box;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #6a8398;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(122, 148, 168, 0.25);
}

.btn-secondary {
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-soft);
}

.btn-block {
  display: block;
  width: 100%;
  margin-top: 8px;
}

/* エラー表示 */
.form-error {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  background: #fdecea;
  color: #8c1a15;
  border: 1px solid #f5c2bf;
  border-radius: 8px;
  font-size: 0.85rem;
}

/* 使い方ガイド */
.calc-guide {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.calc-guide h4 {
  font-size: 0.9rem;
  margin: 0 0 8px;
  color: var(--text);
}

.calc-guide ol {
  margin: 0;
  padding-left: 20px;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-sub);
}

/* ============================================
   結果パネル
   ============================================ */

.initial-message {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.result-section {
  margin-bottom: 24px;
}

.result-section:last-child {
  margin-bottom: 0;
}

.result-section h3 {
  font-size: 0.95rem;
  margin: 0 0 12px;
  color: var(--text);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.result-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-bottom: 16px;
}

.result-summary .summary-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.result-summary strong {
  color: var(--text);
}

/* 混雑レベル */
.crowd-display {
  display: flex;
  justify-content: center;
}

.crowd-badge {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  transition: background 0.3s;
}

.crowd-level-number {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.crowd-label {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 6px;
}

.crowd-visitors {
  font-size: 0.72rem;
  margin-top: 6px;
  opacity: 0.9;
}

/* 待ち時間比較 */
.wait-time-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .wait-time-comparison {
    grid-template-columns: 1fr;
  }
}

.wait-scenario {
  padding: 14px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.wait-scenario.dpa-scenario {
  background: #eaf5ef;
  border-color: #c7e3d3;
}

.wait-scenario.standby-scenario {
  background: #fdf4e0;
  border-color: #e8d8b3;
}

.scenario-header h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text);
}

.wait-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.85rem;
}

.wait-row .label {
  color: var(--text-sub);
}

.wait-row .value {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.wait-row.highlight .value {
  font-weight: 700;
}

/* 価格テーブル */
.pricing-table {
  background: var(--surface);
  border-radius: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.pricing-row:last-child {
  border-bottom: none;
}

.pricing-row .label {
  color: var(--text-sub);
}

.pricing-row .value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
}

.pricing-row .note {
  display: block;
  width: 100%;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 400;
}

.pricing-row.highlight {
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 10px 10px;
  margin: 4px -10px;
}

.pricing-row.verdict-row {
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 12px 10px;
  margin: 4px -10px;
}

.pricing-row.verdict-row .value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

/* 判定バッジ */
.verdict-badge {
  padding: 22px 20px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid;
}

.verdict-badge .badge-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.verdict-badge .badge-message {
  font-size: 0.85rem;
  opacity: 0.85;
}

.verdict-badge.badge-highly-recommended {
  background: #eaf5ef;
  border-color: #2f9057;
  color: #1f5f3a;
}

.verdict-badge.badge-recommended {
  background: #e5f1f8;
  border-color: #2c6b97;
  color: #184567;
}

.verdict-badge.badge-maybe {
  background: #fdf4e0;
  border-color: #b08840;
  color: #6b5020;
}

.verdict-badge.badge-not-needed {
  background: #faeded;
  border-color: #a64848;
  color: #702020;
}

/* 説明文 */
.explanation-section p {
  line-height: 1.8;
  color: var(--text-sub);
  font-size: 0.9rem;
  margin: 0;
}

/* アクション */
.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.result-actions .btn {
  flex: 1;
}

@media (max-width: 600px) {
  .result-actions {
    flex-direction: column;
  }
}

/* ============================================
   参考情報
   ============================================ */

.calc-reference {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.calc-reference h2 {
  font-size: 1.1rem;
  margin: 0 0 18px;
  color: var(--text);
}

.reference-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  padding: 9px 14px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-sub);
  transition: color 0.2s, border-color 0.2s;
  font-family: inherit;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: dpaFadeIn 0.3s ease-in;
}

@keyframes dpaFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* アトラクション一覧 */
.attractions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.park-group {
  background: var(--surface);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.park-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.attractions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.attractions-table th {
  padding: 7px 8px;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  background: var(--border-light);
  font-size: 0.78rem;
}

.attractions-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.attractions-table tbody tr:hover {
  background: var(--accent-soft);
}

.attractions-table a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.attractions-table a:hover {
  text-decoration: underline;
}

.attractions-table .price-col {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
}

/* 混雑ガイドテーブル */
.crowd-guide-table {
  overflow-x: auto;
}

.crowd-guide-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--surface);
}

.crowd-guide-table th {
  padding: 10px;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  background: var(--border-light);
}

.crowd-guide-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-light);
}

.crowd-guide-table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-highly-recommended {
  background: #eaf5ef;
  color: #1f5f3a;
}

.badge-recommended {
  background: #e5f1f8;
  color: #184567;
}

.badge-maybe {
  background: #fdf4e0;
  color: #6b5020;
}

.badge-not-needed {
  background: #faeded;
  color: #702020;
}

.guide-notes {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.7;
}

.guide-notes p {
  margin: 0 0 8px;
  font-weight: 600;
  color: var(--text);
}

.guide-notes ul {
  margin: 0;
  padding-left: 18px;
}

.guide-notes li {
  margin-bottom: 6px;
}

/* ============================================
   関連リンク
   ============================================ */

.related-links {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 32px;
}

.related-links h2 {
  font-size: 1rem;
  margin: 0 0 14px;
  color: var(--text);
}

.related-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-links li {
  padding: 6px 0;
  font-size: 0.88rem;
}

.related-links li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: middle;
}

.related-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.related-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.related-links .note {
  color: var(--text-muted);
  font-weight: 300;
  font-size: 0.82rem;
  margin-left: 6px;
}
