/* メインレイアウト */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* カード */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-icon {
  font-size: 16px;
}

/* ページタイトル */
.page-heading {
  margin-bottom: 28px;
}

.page-heading h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.page-heading p {
  font-size: 14px;
  color: var(--text-muted);
}

.page-heading .badge {
  display: inline-block;
  background: var(--accent-glow);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--accent-light);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  margin-bottom: 10px;
}

/* 選定結果バナー */
.recommendation-banner {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12) 0%, rgba(168, 85, 247, 0.08) 100%);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.recommendation-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.recommendation-icon-wrap {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  box-shadow: 0 0 24px var(--accent-glow);
}

.recommendation-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1.2;
  margin-bottom: 4px;
}

.recommendation-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.recommendation-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.reason-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.reason-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.reason-check {
  color: var(--green);
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

.reason-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}

/* テーブル */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  padding: 10px 14px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border);
  background: var(--card2);
}

.data-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.data-table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(42, 45, 62, 0.6);
  color: var(--text);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.data-table .service-name {
  font-weight: 600;
  color: var(--accent-light);
}

.data-table .price {
  font-weight: 700;
  font-family: monospace;
  color: var(--text);
}

.data-table .price.free {
  color: var(--green);
}

.data-table .price.total {
  color: var(--yellow);
  font-size: 15px;
}

.data-table tr.total-row td {
  background: rgba(234, 179, 8, 0.05);
  border-top: 1px solid rgba(234, 179, 8, 0.2);
  border-bottom: none;
  font-weight: 600;
}

/* チェックリスト */
.checklist-setup {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-item-setup {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--card2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  user-select: none;
}

.check-item-setup:hover {
  border-color: var(--accent);
}

.check-item-setup.checked {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.04);
}

.check-item-setup input[type="checkbox"] {
  display: none;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-dim);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 12px;
}

.check-item-setup.checked .custom-checkbox {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.check-label {
  font-size: 13px;
  color: var(--text);
  transition: color 0.2s;
}

.check-item-setup.checked .check-label {
  text-decoration: line-through;
  color: var(--text-dim);
}

.checklist-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--card2);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.4s ease;
}

.progress-text {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.reset-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s;
}

.reset-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

/* クイックリンク */
.link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 14px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
  text-align: center;
}

.quick-link:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.quick-link-icon {
  font-size: 24px;
}

.quick-link-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.quick-link-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* コードブロック */
.code-block-wrap {
  position: relative;
}

.code-block {
  background: #0a0c13;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  color: #c9d1d9;
  overflow-x: auto;
  line-height: 1.7;
  white-space: pre;
  max-height: 360px;
  overflow-y: auto;
}

.code-block::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.code-block::-webkit-scrollbar-track {
  background: var(--card);
}

.code-block::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.copy-btn.copied {
  border-color: var(--green);
  color: var(--green);
}

/* フッター */
.footer-note {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 12px;
  padding-bottom: 24px;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .reason-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .main {
    padding: 16px 12px;
  }

  .card {
    padding: 16px;
  }

  .page-heading h1 {
    font-size: 20px;
  }

  .recommendation-name {
    font-size: 18px;
  }

  .recommendation-icon-wrap {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

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

@media (min-width: 641px) and (max-width: 1024px) {
  .main {
    padding: 24px 16px;
  }

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