/* ---------- 资源反馈 ---------- */
.feedback-layout {
  display: grid;
  gap: 14px;
  max-width: 720px;
  min-width: 0;
}
/* 反馈类型：白色胶囊里两个分段，选中为金色并滑动切换 */
.feedback-kind {
  position: relative;
  display: inline-flex;
  justify-self: start;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--glass-edge), var(--highlight), var(--shadow-sm);
}
.feedback-kind button {
  padding: 8px 22px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}
.feedback-kind button:hover {
  background: rgba(22, 22, 24, 0.05);
}
.feedback-kind button[aria-selected="true"],
.feedback-kind .slide-pill {
  color: var(--primary-ink);
  background: var(--primary-bg);
  box-shadow:
    inset 0 0 0 1px var(--primary-edge),
    var(--primary-shadow);
}
.feedback-kind.has-slider button[aria-selected="true"] {
  background: transparent;
  box-shadow: none;
}
.feedback-form {
  display: grid;
  min-width: 0;
}
.feedback-form > label:first-child,
.feedback-form > .feedback-label:first-child {
  margin-top: 0;
}
.feedback-form label span,
.feedback-label-row label span {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 450;
  color: var(--muted);
}
.feedback-label {
  display: block;
  margin: 18px 0 10px;
  font-size: 13px;
  font-weight: 560;
  color: var(--ink-2);
}
.feedback-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 10px;
}
.feedback-label-row label {
  margin: 0;
}
.feedback-form textarea {
  min-height: 0;
  line-height: 1.7;
}
.feedback-links {
  font-family: var(--mono);
  font-size: 13px;
}
/* 资源库 / 问题类型：可换行的胶囊单选 */
.feedback-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feedback-chip {
  gap: 7px;
  padding: 8px 16px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.feedback-chip .library-logo {
  width: 18px;
  height: 18px;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}
.feedback-chip[aria-checked="true"] {
  color: var(--primary-ink);
  border-color: transparent;
  background: var(--primary-bg);
  box-shadow:
    inset 0 0 0 1px var(--primary-edge),
    var(--primary-shadow);
}
.feedback-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}
/* 我的反馈 */
.feedback-history {
  margin-top: 14px;
}
.feedback-history h2 {
  margin: 0 4px 12px;
  font-size: 16px;
}
.feedback-list {
  display: grid;
  gap: 10px;
}
.feedback-item {
  min-width: 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow), var(--highlight);
}
.feedback-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 12px;
}
.feedback-tag {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-weight: 600;
}
.feedback-meta {
  color: var(--muted);
}
/* 等待回复：灰色标签；已回复：绿色标签 + 浅金色回复气泡 */
.feedback-state {
  margin-left: auto;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-weight: 600;
}
.feedback-item.is-replied .feedback-state,
.feedback-item.is-done .feedback-state {
  background: var(--ok-bg);
  color: var(--ok);
}
.feedback-reply {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbf4e4 0%, #f6ead0 100%);
  box-shadow: inset 0 0 0 1px var(--primary-edge);
}
.feedback-reply-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 620;
  color: var(--primary-ink);
}
.feedback-new {
  padding: 0 7px;
  border-radius: 999px;
  background: var(--bad);
  color: #fff;
  font-size: 11px;
  line-height: 17px;
}
.feedback-reply-text {
  margin-top: 4px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
/* 顶部导航：有未看过的回复时在"资源反馈"右上角显示红点 */
.header nav a[data-view="feedback"] {
  position: relative;
}
.header nav a.has-reply::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bad);
  box-shadow: 0 0 0 2px #fff;
}
.feedback-item-title {
  margin-top: 10px;
  font-size: 14.5px;
  font-weight: 620;
  overflow-wrap: anywhere;
}
.feedback-item-link {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feedback-item-text {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.feedback-item-time {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--faint);
}
@media (max-width: 720px) {
  .feedback-kind {
    justify-self: stretch;
  }
  .feedback-kind button {
    flex: 1;
    padding: 8px 12px;
  }
  .feedback-actions .primary {
    width: 100%;
  }
}
