/* ============================================
   复原力总览 - 工具详情页 (iOS 风格)
   ============================================ */

.tool-detail {
  padding: 0;
  min-height: calc(100vh - var(--nav-height) - var(--tab-height));
}

/* 工具头部 - 紧凑 */
.tool-header {
  text-align: center;
  padding: 20px 16px 16px;
  background: var(--color-bg);
}

.tool-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-header-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.tool-header-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.tool-header-desc {
  font-size: var(--font-sm);
  color: var(--color-label-tertiary);
  line-height: 1.5;
  padding: 0 20px;
}

/* 工具内容区 */
.tool-body {
  background: var(--color-bg-card);
  border-radius: 14px;
  padding: 16px;
  margin: 12px 16px;
  border: 0.5px solid var(--color-separator);
}

/* 提示卡片 */
.tool-hint {
  background: var(--color-bg);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.tool-hint-title {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--color-label);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-hint-text {
  font-size: var(--font-sm);
  color: var(--color-label-secondary);
  line-height: 1.6;
}

/* 输入组件 */
.input-group { margin-bottom: 16px; }

.input-label {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--color-label);
  margin-bottom: 8px;
  display: block;
}

.input-label .required {
  color: var(--color-red);
  margin-left: 4px;
}

.text-input {
  width: 100%;
  min-height: 80px;
  padding: 12px 14px;
  background: var(--color-bg);
  border-radius: 10px;
  font-size: var(--font-md);
  line-height: 1.5;
  resize: vertical;
  transition: all 0.15s ease;
  border: 0.5px solid transparent;
}

.text-input:focus {
  background: white;
  border-color: var(--color-blue);
}

.text-input::placeholder { color: var(--color-label-tertiary); }

/* 列表输入 */
.list-input-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.list-input-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-blue);
  color: white;
  font-size: var(--font-xxs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 4px;
}

.list-input-field {
  flex: 1;
  padding: 10px 12px;
  background: var(--color-bg);
  border-radius: 10px;
  font-size: var(--font-md);
  transition: all 0.15s ease;
  border: 0.5px solid transparent;
}

.list-input-field:focus {
  background: white;
  border-color: var(--color-blue);
}

/* 问答/选择题 */
.quiz-question {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--color-label);
  margin-bottom: 20px;
  line-height: 1.5;
}

.quiz-option {
  display: block;
  padding: 14px 16px;
  background: var(--color-bg-card);
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: var(--font-md);
  color: var(--color-label);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 0.5px solid var(--color-separator);
}

.quiz-option:active { opacity: 0.5; }

.quiz-option.selected {
  background: var(--color-blue);
  color: white;
  border-color: var(--color-blue);
}

/* 选择型（标签） */
.selection-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selection-item {
  padding: 8px 14px;
  background: var(--color-bg);
  border-radius: 14px;
  font-size: var(--font-sm);
  color: var(--color-label-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 0.5px solid transparent;
}

.selection-item:active { transform: scale(0.95); }

.selection-item.selected {
  background: var(--color-blue);
  color: white;
  font-weight: 600;
}

.selection-item.disabled { opacity: 0.4; pointer-events: none; }

/* 引导型步骤 */
.guide-step {
  text-align: center;
  padding: 20px 0;
}

.guide-step-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.guide-step-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.guide-step-title {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--color-label);
  margin-bottom: 8px;
}

.guide-step-desc {
  font-size: var(--font-md);
  color: var(--color-label-secondary);
  line-height: 1.7;
}

.guide-step-counter {
  font-size: var(--font-sm);
  color: var(--color-label-tertiary);
  margin-top: 12px;
}

/* 工具底部操作 */
.tool-actions {
  display: flex;
  gap: 8px;
  padding: 8px 16px 16px;
}

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

/* ABC模型 */
.abc-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.abc-item {
  background: var(--color-bg);
  border-radius: 12px;
  padding: 14px;
}

.abc-label {
  font-size: var(--font-sm);
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.abc-label .tag {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: var(--font-xxs);
  font-weight: 700;
  color: white;
}

.abc-a .tag { background: var(--color-red); }
.abc-b .tag { background: var(--color-purple); }
.abc-c .tag { background: var(--color-green); }

.abc-textarea {
  width: 100%;
  min-height: 60px;
  font-size: var(--font-sm);
  line-height: 1.5;
}

/* 树状图 */
.meaning-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}

.tree-root, .tree-trunk, .tree-branches {
  width: 100%;
  max-width: 260px;
}

.tree-node {
  background: var(--color-purple);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: var(--font-sm);
  font-weight: 600;
  text-align: center;
  margin-bottom: 4px;
}

.tree-trunk .tree-node { background: var(--color-green); }

.tree-branches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.tree-branches .tree-node {
  background: var(--color-orange);
  font-size: var(--font-xs);
  padding: 6px 10px;
  margin-bottom: 0;
  flex: 1;
  min-width: 70px;
}

/* 象限图 */
.quadrant-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  padding: 8px;
}

.quadrant {
  border-radius: 10px;
  padding: 12px;
  min-height: 100px;
  text-align: center;
  border: 0.5px solid var(--color-separator);
}

.quadrant-title {
  font-size: var(--font-sm);
  font-weight: 700;
  margin-bottom: 2px;
}

.quadrant-desc {
  font-size: var(--font-xxs);
  color: var(--color-label-tertiary);
}

.q1 { background: rgba(255,59,48,0.1); }
.q1 .quadrant-title { color: var(--color-red); }
.q2 { background: rgba(52,199,89,0.1); }
.q2 .quadrant-title { color: var(--color-green); }
.q3 { background: rgba(175,82,222,0.1); }
.q3 .quadrant-title { color: var(--color-purple); }
.q4 { background: rgba(255,149,0,0.1); }
.q4 .quadrant-title { color: var(--color-orange); }

/* 社会支持圈层 */
.support-circles {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.support-circle {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: var(--font-xxs);
  font-weight: 600;
  color: white;
  padding: 8px;
}

.circle-1 {
  width: 240px; height: 240px;
  background: rgba(255,149,0,0.5);
}
.circle-2 {
  width: 160px; height: 160px;
  background: rgba(175,82,222,0.6);
}
.circle-3 {
  width: 90px; height: 90px;
  background: rgba(52,199,89,0.7);
}

/* 掌控图 */
.control-map {
  position: relative;
  width: 100%;
  max-width: 300px;
  height: 280px;
  margin: 0 auto;
}

.control-circle {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  font-size: var(--font-xxs);
  font-weight: 600;
}

.control-self {
  width: 150px; height: 150px;
  background: rgba(52,199,89,0.8);
  color: white;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.control-others {
  width: 90px; height: 90px;
  background: rgba(175,82,222,0.7);
  color: white;
  top: 16px; right: 16px;
}

.control-god {
  width: 70px; height: 70px;
  background: rgba(255,149,0,0.7);
  color: white;
  bottom: 16px; left: 16px;
}

/* 情绪词汇选择 */
.emotion-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 8px 0;
}

.emotion-chip {
  padding: 6px 12px;
  background: var(--color-bg);
  border-radius: 12px;
  font-size: var(--font-sm);
  color: var(--color-label-secondary);
  transition: all 0.15s ease;
}

.emotion-chip:active { transform: scale(0.95); }

.emotion-chip.selected {
  background: var(--color-red);
  color: white;
  font-weight: 600;
}

/* 二选一 */
.choice-binary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 0;
}

.choice-option {
  padding: 20px 12px;
  background: var(--color-bg);
  border-radius: 12px;
  text-align: center;
  transition: all 0.15s ease;
  border: 0.5px solid var(--color-separator);
}

.choice-option:active { opacity: 0.7; }

.choice-option.selected {
  border-color: var(--color-blue);
  background: rgba(0,122,255,0.08);
}

.choice-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.choice-icon svg { width: 20px; height: 20px; }

/* 公式生成 */
.formula-display {
  background: var(--color-bg);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  margin: 12px 0;
}

.formula-text {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--color-label);
  line-height: 1.6;
}

.formula-highlight { color: var(--color-blue); }
.formula-multiply { color: var(--color-label-tertiary); margin: 0 4px; }

/* 价值词汇 */
.value-vocab {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.value-item {
  padding: 8px 16px;
  background: var(--color-bg);
  border-radius: 14px;
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--color-label);
  transition: all 0.15s ease;
  border: 0.5px solid transparent;
  cursor: pointer;
}

.value-item:active { transform: scale(0.95); }

.value-item.selected {
  background: var(--color-purple);
  color: white;
  border-color: transparent;
}

.value-item.disabled { opacity: 0.4; pointer-events: none; }

/* 自检轮 */
.self-check-list { counter-reset: check; }

.self-check-item {
  counter-increment: check;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--color-separator);
}

.self-check-item:last-child { border-bottom: none; }

.self-check-number {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-blue);
  color: white;
  font-size: var(--font-xxs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.self-check-text {
  flex: 1;
  font-size: var(--font-sm);
  color: var(--color-label);
  line-height: 1.5;
}

.self-check-toggle {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.toggle-yes, .toggle-no {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-xxs);
  font-weight: 700;
  color: var(--color-label-tertiary);
  background: var(--color-bg);
  transition: all 0.15s ease;
}

.toggle-yes.selected { background: var(--color-green); color: white; }
.toggle-no.selected { background: var(--color-red); color: white; }

/* 贡献图 */
.contribution-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0;
}

.bar-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bar-label {
  font-size: var(--font-sm);
  color: var(--color-label);
  min-width: 50px;
}

.bar-track {
  flex: 1;
  height: 20px;
  background: var(--color-bg);
  border-radius: 10px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bar-value {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--color-label);
  min-width: 32px;
  text-align: right;
}

/* RISE步骤 */
.rise-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rise-step {
  background: var(--color-bg);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.rise-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--color-red);
  color: white;
  font-weight: 700;
  font-size: var(--font-xxs);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rise-step-content { flex: 1; }

.rise-step-title {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--color-label);
  margin-bottom: 2px;
}

.rise-step-desc {
  font-size: var(--font-sm);
  color: var(--color-label-secondary);
  line-height: 1.5;
}

.rise-step-input {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  background: white;
  border-radius: 8px;
  font-size: var(--font-sm);
  border: 0.5px solid var(--color-separator);
  transition: all 0.15s ease;
}

.rise-step-input:focus {
  border-color: var(--color-blue);
  outline: none;
}
