/* 防遗忘中心 */
.retention-hub {
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #F8FAFF 0%, #F0FDF4 55%, #FFFBEB 100%);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.retention-hub-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.retention-hub-head-text {
  flex: 1;
  min-width: 0;
}

.retention-hub-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.retention-collapse-btn {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
}

.retention-collapse-btn:hover {
  border-color: #6366f1;
  color: #4338ca;
}

.retention-hub-compact {
  display: none;
  margin: 6px 0 0;
  font-size: 13px;
  color: #64748b;
}

.retention-hub--collapsed {
  padding-bottom: 12px;
}

.retention-hub--collapsed .retention-hub-body {
  display: none;
}

.retention-hub--collapsed .retention-hub-head {
  margin-bottom: 0;
}

.retention-hub--collapsed .retention-hub-sub {
  display: none;
}

.retention-hub--collapsed .retention-hub-compact {
  display: block;
}

.retention-hub--collapsed .retention-progress-ring {
  width: 44px;
  height: 44px;
  font-size: 11px;
}

.retention-hub-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
}

.retention-hub-sub {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.retention-progress-ring {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #4338ca;
  background: conic-gradient(#6366f1 calc(var(--pct, 0) * 1%), #e2e8f0 0);
  position: relative;
}

.retention-progress-ring::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #fff;
}

.retention-progress-ring span {
  position: relative;
  z-index: 1;
}

.retention-block {
  padding: 12px 14px;
  margin-top: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.retention-block h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}

.retention-reminder-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.retention-stat {
  font-size: 13px;
  color: #475569;
}

.retention-stat strong {
  color: #4338ca;
  font-size: 16px;
}

.retention-stat--ok {
  color: #059669;
}

.retention-reminder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.retention-life-word {
  margin: 0 0 8px;
  font-size: 14px;
  color: #334155;
}

.retention-meaning {
  color: #64748b;
  font-size: 13px;
}

.retention-scene-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.retention-scene-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.retention-scene-btn.active {
  border-color: #6366f1;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 600;
}

.retention-scene-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

.retention-sentence-input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.retention-grade-result {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.55;
  color: #475569;
}

.retention-grade-score {
  margin: 0 0 6px;
  font-weight: 700;
  color: #4338ca;
}

.retention-life-improved {
  margin: 6px 0 0;
  color: #0f766e;
  font-style: italic;
}

.retention-life-tip {
  margin: 6px 0 0;
  color: #b45309;
}

.retention-badge-done {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #d1fae5;
  color: #047857;
  vertical-align: middle;
}

.retention-block--done .retention-life-sentence {
  margin: 0 0 6px;
  font-size: 14px;
  color: #1e293b;
}

.retention-life-feedback {
  margin: 0;
  font-size: 13px;
  color: #475569;
}

.retention-weekly-progress {
  font-size: 12px;
  font-weight: 600;
  color: #6366f1;
}

.retention-weekly-tip {
  margin: 0 0 10px;
  font-size: 12px;
  color: #94a3b8;
}

.retention-weekly-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.retention-weekly-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.retention-weekly-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.retention-weekly-en {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.45;
  color: #1e293b;
}

.retention-weekly-cn {
  margin: 0 0 6px;
  font-size: 12px;
  color: #64748b;
}

.retention-apply-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.retention-apply-chip {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.retention-apply-chip.checked {
  border-style: solid;
  border-color: #34d399;
  background: #ecfdf5;
  color: #047857;
}

.sidebar-right .sidebar-retention-host {
  flex-shrink: 0;
}

.sidebar-right .retention-hub {
  margin-bottom: 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
}

.sidebar-right .retention-hub-title {
  font-size: 14px;
  line-height: 1.3;
}

.sidebar-right .retention-hub-sub {
  font-size: 11px;
  line-height: 1.35;
}

.sidebar-right .retention-hub-head {
  gap: 8px;
  margin-bottom: 10px;
}

.sidebar-right .retention-progress-ring {
  width: 44px;
  height: 44px;
  font-size: 11px;
}

.sidebar-right .retention-block h4 {
  font-size: 13px;
}

.sidebar-right .retention-reminder-actions {
  flex-direction: column;
  align-items: stretch;
}

.sidebar-right .retention-reminder-actions .btn-primary,
.sidebar-right .retention-reminder-actions .btn-ghost-sm {
  width: 100%;
  justify-content: center;
}

.sidebar-right .retention-scene-row {
  flex-direction: column;
  align-items: stretch;
}

.sidebar-right .retention-scene-btn {
  text-align: center;
}

.retention-empty {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.55;
}
