/* ============================================
   生成AI業務削減診断 LP
   - BEM命名規則準拠
   - MENTER デザインシステム拡張
   ============================================ */

:root {
  --shindan-primary: #2563eb;
  --shindan-primary-dark: #1e40af;
  --shindan-accent: #57e6a3;
  --shindan-accent-dark: #1bbb6d;
  --shindan-bg-light: #f0f4ff;
  --shindan-bg-gray: #f8f9fa;
  --shindan-text: #1a1a2e;
  --shindan-text-sub: #555;
  --shindan-border: #e2e8f0;
  --shindan-danger: #ef4444;
  --shindan-warning: #f59e0b;
  --shindan-success: #10b981;
}

/* --- リセット & ベース --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.shindan-body {
  font-family: Arson Pro, source-han-sans-japanese, "游ゴシック体", "Yu Gothic",
    YuGothic, "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ",
    Meiryo, "Helvetica Neue", Helvetica, Arial, "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
  font-weight: 500;
  color: var(--shindan-text);
  line-height: 1.7;
  letter-spacing: 0.04em;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   ヘッダーバー
   ============================================ */
.shindan-header {
  background: #fff;
  border-bottom: 1px solid var(--shindan-border);
  padding: 12px clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.shindan-header__logo {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--shindan-primary);
  text-decoration: none;
  letter-spacing: 0.08em;
}

.shindan-header__back {
  font-size: 0.85rem;
  color: var(--shindan-text-sub);
  text-decoration: none;
  transition: color 0.2s;
}

.shindan-header__back:hover {
  color: var(--shindan-primary);
}

/* ============================================
   ヒーローセクション
   ============================================ */
.shindan-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 30%, #2563eb 70%, #1e40af 100%);
  color: #fff;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 4vw, 3rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.shindan-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 160%;
  background: radial-gradient(ellipse, rgba(87, 230, 163, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.shindan-hero__inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.shindan-hero__badge {
  display: inline-block;
  background: rgba(87, 230, 163, 0.2);
  border: 1px solid rgba(87, 230, 163, 0.4);
  color: var(--shindan-accent);
  padding: 6px 20px;
  border-radius: 20px;
  font-size: clamp(0.75rem, 1.2vw, 0.85rem);
  font-weight: 700;
  margin-bottom: 1.2rem;
  letter-spacing: 0.06em;
}

.shindan-hero__title {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 1rem;
}

.shindan-hero__title em {
  font-style: normal;
  color: var(--shindan-accent);
}

.shindan-hero__subtitle {
  font-size: clamp(0.9rem, 1.4vw, 1.1rem);
  opacity: 0.85;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.shindan-hero__stats {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  flex-wrap: wrap;
}

.shindan-hero__stat {
  text-align: center;
}

.shindan-hero__stat-number {
  display: block;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 900;
  color: var(--shindan-accent);
  line-height: 1.2;
}

.shindan-hero__stat-label {
  font-size: 0.78rem;
  opacity: 0.7;
  margin-top: 4px;
}

/* ============================================
   プログレスバー
   ============================================ */
.shindan-progress {
  background: var(--shindan-bg-gray);
  padding: 16px clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--shindan-border);
  position: sticky;
  top: 49px;
  z-index: 99;
}

.shindan-progress__inner {
  max-width: 700px;
  margin: 0 auto;
}

.shindan-progress__info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: var(--shindan-text-sub);
}

.shindan-progress__step {
  font-weight: 700;
  color: var(--shindan-primary);
}

.shindan-progress__bar {
  width: 100%;
  height: 6px;
  background: var(--shindan-border);
  border-radius: 3px;
  overflow: hidden;
}

.shindan-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--shindan-primary), var(--shindan-accent));
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

/* ============================================
   ステップコンテナ
   ============================================ */
.shindan-main {
  min-height: 60vh;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 3vw, 2rem);
}

.shindan-step {
  max-width: 700px;
  margin: 0 auto;
  display: none;
}

.shindan-step.is-active {
  display: block;
  animation: shindan-fadeIn 0.35s ease-out;
}

@keyframes shindan-fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.shindan-step__category {
  display: inline-block;
  background: var(--shindan-bg-light);
  color: var(--shindan-primary);
  padding: 4px 14px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.shindan-step__question {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
}

.shindan-step__evidence {
  font-size: 0.8rem;
  color: var(--shindan-text-sub);
  margin-bottom: 24px;
  padding: 10px 14px;
  background: var(--shindan-bg-gray);
  border-radius: 8px;
  border-left: 3px solid var(--shindan-accent);
}

/* --- 選択肢カード --- */
.shindan-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shindan-choice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 2px solid var(--shindan-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}

.shindan-choice:hover {
  border-color: var(--shindan-primary);
  background: var(--shindan-bg-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.shindan-choice.is-selected {
  border-color: var(--shindan-primary);
  background: var(--shindan-bg-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.shindan-choice__radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--shindan-border);
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s;
}

.shindan-choice.is-selected .shindan-choice__radio {
  border-color: var(--shindan-primary);
  background: var(--shindan-primary);
}

.shindan-choice.is-selected .shindan-choice__radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.shindan-choice__icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.shindan-choice__body {
  flex: 1;
}

.shindan-choice__label {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
}

.shindan-choice__desc {
  font-size: 0.78rem;
  color: var(--shindan-text-sub);
  margin-top: 2px;
}

/* --- 基本情報入力 --- */
.shindan-form-group {
  margin-bottom: 24px;
}

.shindan-form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.shindan-form-group label .required {
  color: var(--shindan-danger);
  font-size: 0.75rem;
  margin-left: 6px;
}

.shindan-select,
.shindan-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border: 2px solid var(--shindan-border);
  border-radius: 10px;
  background: #fff;
  color: var(--shindan-text);
  font-family: inherit;
  transition: border-color 0.2s;
  appearance: none;
}

.shindan-select:focus,
.shindan-input:focus {
  outline: none;
  border-color: var(--shindan-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.shindan-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* ============================================
   ナビゲーションボタン
   ============================================ */
.shindan-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 12px;
}

.shindan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  letter-spacing: 0.03em;
}

.shindan-btn--primary {
  background: linear-gradient(135deg, var(--shindan-primary), var(--shindan-primary-dark));
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.shindan-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.shindan-btn--primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.shindan-btn--accent {
  background: linear-gradient(135deg, var(--shindan-accent-dark), var(--shindan-success));
  color: #fff;
  box-shadow: 0 4px 14px rgba(27, 187, 109, 0.3);
}

.shindan-btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27, 187, 109, 0.4);
}

.shindan-btn--ghost {
  background: transparent;
  color: var(--shindan-text-sub);
  border: 1px solid var(--shindan-border);
}

.shindan-btn--ghost:hover {
  background: var(--shindan-bg-gray);
  color: var(--shindan-text);
}

.shindan-btn--large {
  padding: 18px 48px;
  font-size: 1.1rem;
  border-radius: 12px;
}

/* ============================================
   結果ページ
   ============================================ */
.shindan-result {
  max-width: 860px;
  margin: 0 auto;
  display: none;
}

.shindan-result.is-active {
  display: block;
  animation: shindan-fadeIn 0.5s ease-out;
}

/* --- サマリーカード --- */
.shindan-result__summary {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 40%, #2563eb 100%);
  color: #fff;
  border-radius: 20px;
  padding: clamp(2rem, 5vw, 3rem);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.shindan-result__summary::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 50%;
  height: 140%;
  background: radial-gradient(ellipse, rgba(87, 230, 163, 0.15) 0%, transparent 65%);
  pointer-events: none;
}

.shindan-result__summary-inner {
  position: relative;
  z-index: 1;
}

.shindan-result__label {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 4px;
}

.shindan-result__headline {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 500;
  margin-bottom: 20px;
  opacity: 0.9;
}

.shindan-result__value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.shindan-result__value-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(4px);
}

.shindan-result__value-num {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--shindan-accent);
  line-height: 1.1;
}

.shindan-result__value-num small {
  font-size: 0.45em;
  font-weight: 700;
}

.shindan-result__value-label {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-top: 6px;
}

/* --- 内訳テーブル --- */
.shindan-result__detail {
  background: #fff;
  border: 1px solid var(--shindan-border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
}

.shindan-result__detail-header {
  background: var(--shindan-bg-light);
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--shindan-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.shindan-result__table-wrap {
  overflow-x: auto;
}

.shindan-result__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.shindan-result__table th {
  background: var(--shindan-bg-gray);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--shindan-text-sub);
  border-bottom: 1px solid var(--shindan-border);
  white-space: nowrap;
}

.shindan-result__table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--shindan-border);
  vertical-align: middle;
}

.shindan-result__table tr:last-child td {
  border-bottom: none;
}

.shindan-result__table tr:hover td {
  background: var(--shindan-bg-light);
}

.shindan-result__dept-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.shindan-result__dept-tag--all { background: #e0e7ff; color: #3730a3; }
.shindan-result__dept-tag--sales { background: #dbeafe; color: #1d4ed8; }
.shindan-result__dept-tag--cs { background: #d1fae5; color: #065f46; }
.shindan-result__dept-tag--hr { background: #fce7f3; color: #9d174d; }
.shindan-result__dept-tag--legal { background: #ede9fe; color: #5b21b6; }
.shindan-result__dept-tag--it { background: #cffafe; color: #155e75; }
.shindan-result__dept-tag--mktg { background: #fef3c7; color: #92400e; }
.shindan-result__dept-tag--plan { background: #f3e8ff; color: #6b21a8; }
.shindan-result__dept-tag--med { background: #fce4ec; color: #880e4f; }

.shindan-result__savings-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shindan-result__bar-track {
  flex: 1;
  height: 8px;
  background: var(--shindan-border);
  border-radius: 4px;
  overflow: hidden;
  min-width: 60px;
}

.shindan-result__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--shindan-primary), var(--shindan-accent));
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.shindan-result__bar-value {
  font-weight: 700;
  color: var(--shindan-primary);
  white-space: nowrap;
  min-width: 60px;
  text-align: right;
}

/* --- サマリーグラフ（ドーナツ＋横棒） --- */
.shindan-result__charts {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  margin-bottom: 32px;
  align-items: start;
}

.shindan-result__donut-wrap {
  background: #fff;
  border: 1px solid var(--shindan-border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.shindan-result__donut-wrap h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--shindan-text-sub);
  margin-bottom: 16px;
}

.shindan-result__donut-canvas {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 12px;
}

.shindan-result__donut-canvas svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.shindan-result__donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.shindan-result__donut-center-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--shindan-primary);
  line-height: 1;
}

.shindan-result__donut-center-label {
  font-size: 0.7rem;
  color: var(--shindan-text-sub);
  margin-top: 2px;
}

.shindan-result__donut-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.75rem;
}

.shindan-result__legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shindan-result__legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.shindan-result__hbar-wrap {
  background: #fff;
  border: 1px solid var(--shindan-border);
  border-radius: 16px;
  padding: 24px;
}

.shindan-result__hbar-wrap h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--shindan-text-sub);
  margin-bottom: 16px;
}

.shindan-result__hbar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shindan-result__hbar-item {
  display: grid;
  grid-template-columns: 140px 1fr 70px;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}

.shindan-result__hbar-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.shindan-result__hbar-track {
  height: 20px;
  background: var(--shindan-bg-gray);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.shindan-result__hbar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.19, 1, 0.22, 1);
  min-width: 2px;
}

.shindan-result__hbar-val {
  font-weight: 700;
  text-align: right;
  color: var(--shindan-text);
  font-size: 0.82rem;
}

@media (max-width: 700px) {
  .shindan-result__charts {
    grid-template-columns: 1fr;
  }
  .shindan-result__hbar-item {
    grid-template-columns: 100px 1fr 60px;
    font-size: 0.75rem;
  }
}

/* --- 付加価値セクション --- */
.shindan-result__bonus {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.shindan-result__bonus-title {
  font-size: 1rem;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shindan-result__bonus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.shindan-result__bonus-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #d1fae5;
}

.shindan-result__bonus-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--shindan-text);
}

.shindan-result__bonus-card p {
  font-size: 0.78rem;
  color: var(--shindan-text-sub);
  line-height: 1.6;
}

.shindan-result__bonus-value {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--shindan-success);
  margin-top: 6px;
}

/* --- エビデンスセクション --- */
.shindan-result__evidence {
  background: var(--shindan-bg-gray);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.shindan-result__evidence-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.shindan-result__evidence-list {
  list-style: none;
  font-size: 0.8rem;
  color: var(--shindan-text-sub);
  line-height: 2;
}

.shindan-result__evidence-list a {
  color: var(--shindan-primary);
  text-decoration: none;
}

.shindan-result__evidence-list a:hover {
  text-decoration: underline;
}

/* --- CTA --- */
.shindan-result__cta {
  text-align: center;
  padding: 40px 20px;
  background: var(--shindan-bg-light);
  border-radius: 16px;
  margin-bottom: 24px;
}

.shindan-result__cta-title {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  margin-bottom: 8px;
}

.shindan-result__cta-desc {
  font-size: 0.9rem;
  color: var(--shindan-text-sub);
  margin-bottom: 20px;
}

/* ============================================
   フッター
   ============================================ */
.shindan-footer {
  text-align: center;
  padding: 24px;
  font-size: 0.75rem;
  color: var(--shindan-text-sub);
  border-top: 1px solid var(--shindan-border);
}

.shindan-footer a {
  color: var(--shindan-text-sub);
  text-decoration: none;
}

.shindan-footer a:hover {
  color: var(--shindan-primary);
}

/* ============================================
   レスポンシブ
   ============================================ */
@media (max-width: 600px) {
  .shindan-hero__stats {
    gap: 1rem;
  }
  .shindan-hero__stat {
    flex: 0 0 calc(50% - 0.5rem);
  }
  .shindan-result__value-grid {
    grid-template-columns: 1fr 1fr;
  }
  .shindan-nav {
    flex-direction: column-reverse;
  }
  .shindan-nav .shindan-btn {
    width: 100%;
  }
  .shindan-result__table {
    font-size: 0.78rem;
  }
  .shindan-result__table th,
  .shindan-result__table td {
    padding: 8px 10px;
  }
  .shindan-result__bonus-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .shindan-result__value-grid {
    grid-template-columns: 1fr;
  }
}
