/* PC 视频评论区（TASK-V2-VIDEO-COMMENTS-WEB，需求 11.20 R-03）；颜色全部取主题变量，深浅主题自动切换 */
.ys2-comments {
  --ys2-comment-pink: #f2557a;
  background: var(--ys2-surface);
  border: 1px solid var(--ys2-line);
  border-radius: var(--ys2-radius);
  color: var(--ys2-text);
  margin: 18px 0 0;
  padding: 22px 24px 24px;
  position: relative;
}
.ys2-comments-title {
  align-items: center;
  display: flex;
  font-size: 22px;
  font-weight: 700;
  gap: 10px;
  margin: 0 0 16px;
}
.ys2-comments-title svg {
  fill: none;
  height: 30px;
  stroke: var(--ys2-comment-pink);
  stroke-width: 1.8;
  width: 30px;
}
.ys2-comments-title svg circle {
  fill: var(--ys2-comment-pink);
  stroke: none;
}
.ys2-comments-title small {
  color: var(--ys2-muted);
  font-size: 14px;
  font-weight: 400;
}

/* 输入框 */
.ys2-comment-composer {
  background: var(--ys2-bg);
  border: 1px solid var(--ys2-line);
  border-radius: 10px;
  padding: 14px 16px 12px;
  position: relative;
}
.ys2-comment-composer textarea {
  background: transparent;
  border: 0;
  color: var(--ys2-text);
  display: block;
  font: inherit;
  font-size: 15px;
  line-height: 1.6;
  min-height: 56px;
  outline: 0;
  padding: 0;
  resize: vertical;
  width: 100%;
}
.ys2-comment-composer textarea::placeholder {
  color: var(--ys2-muted);
}
.ys2-comment-rule {
  color: var(--ys2-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 6px 0 10px;
}
.ys2-comment-toolbar {
  align-items: center;
  display: flex;
  gap: 16px;
}
.ys2-comment-count {
  color: var(--ys2-muted);
  font-size: 14px;
  margin-left: auto;
}
.ys2-comment-count.over {
  color: #e5484d;
}
.ys2-comment-send {
  background: var(--ys2-comment-pink, #f2557a);
  border: 0;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  min-width: 76px;
  padding: 7px 18px;
}
.ys2-comment-send:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* 表情 */
.ys2-comment-emoji {
  position: relative;
}
.ys2-comment-emoji > button {
  background: transparent;
  border: 0;
  color: var(--ys2-muted);
  cursor: pointer;
  display: grid;
  padding: 0;
  place-items: center;
}
.ys2-comment-emoji > button:hover {
  color: var(--ys2-text);
}
.ys2-comment-emoji svg {
  fill: none;
  height: 26px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
  width: 26px;
}
.ys2-comment-emoji svg circle[r='.8'] {
  fill: currentColor;
}
.ys2-comment-emoji-panel {
  background: var(--ys2-surface);
  border: 1px solid var(--ys2-line);
  border-radius: 10px;
  box-shadow: var(--ys2-shadow);
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(8, 34px);
  left: 0;
  padding: 8px;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 20;
}
.ys2-comment-emoji-panel button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 20px;
  height: 34px;
  padding: 0;
}
.ys2-comment-emoji-panel button:hover {
  background: var(--ys2-accent-soft);
}

/* 全部 / 熱門 */
.ys2-comment-sort {
  display: inline-flex;
  margin: 20px 0 4px;
}
.ys2-comment-sort button {
  background: var(--ys2-bg);
  border: 0;
  color: var(--ys2-muted);
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  padding: 8px 20px;
}
.ys2-comment-sort button:first-child {
  border-radius: 4px 0 0 4px;
}
.ys2-comment-sort button:last-child {
  border-radius: 0 4px 4px 0;
}
.ys2-comment-sort button.is-active {
  background: var(--ys2-line);
  color: var(--ys2-text);
  font-weight: 600;
}

/* 列表 */
.ys2-comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ys2-comment-item {
  border-bottom: 1px solid var(--ys2-line);
  padding: 14px 0;
}
.ys2-comment-item:last-child {
  border-bottom: 0;
}
.ys2-comment-row {
  display: flex;
  gap: 14px;
  padding: 4px 0;
  position: relative;
}
.ys2-comment-reply {
  margin-left: 62px;
}
.ys2-comment-avatar {
  align-items: center;
  background: var(--ys2-accent-soft);
  border-radius: 50%;
  color: var(--ys2-accent);
  display: inline-flex;
  flex: 0 0 48px;
  font-size: 18px;
  font-weight: 700;
  height: 48px;
  justify-content: center;
  overflow: hidden;
  width: 48px;
}
.ys2-comment-reply .ys2-comment-avatar {
  flex-basis: 34px;
  font-size: 14px;
  height: 34px;
  width: 34px;
}
.ys2-comment-avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}
.ys2-comment-body {
  flex: 1;
  min-width: 0;
  padding-right: 30px;
}
.ys2-comment-head {
  align-items: center;
  display: flex;
  gap: 8px;
}
.ys2-comment-head b {
  color: var(--ys2-muted);
  font-size: 15px;
  font-weight: 500;
}
.ys2-comment-status {
  border: 1px solid var(--ys2-comment-pink);
  border-radius: 3px;
  color: var(--ys2-comment-pink);
  font-size: 12px;
  font-style: normal;
  padding: 0 5px;
}
.ys2-comment-content {
  font-size: 16px;
  line-height: 1.65;
  margin: 6px 0 8px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.ys2-comment-at {
  color: var(--ys2-comment-pink);
}
.ys2-comment-foot {
  align-items: center;
  color: var(--ys2-muted);
  display: flex;
  font-size: 14px;
  gap: 28px;
}
.ys2-comment-foot button {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  gap: 6px;
  padding: 0;
}
.ys2-comment-foot button:hover:not(:disabled),
.ys2-comment-like.active {
  color: var(--ys2-comment-pink);
}
.ys2-comment-foot button:disabled {
  cursor: default;
}
.ys2-comment-like svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.7;
  width: 18px;
}
.ys2-comment-like.active svg {
  fill: currentColor;
}
.ys2-comment-more-replies {
  color: var(--ys2-muted);
  font-size: 13px;
  margin: 4px 0 0 62px;
}

/* ⋮ 菜单 */
.ys2-comment-menu {
  position: absolute;
  right: 0;
  top: 2px;
}
.ys2-comment-menu > button {
  background: transparent;
  border: 0;
  color: var(--ys2-muted);
  cursor: pointer;
  display: grid;
  padding: 2px;
}
.ys2-comment-menu > button svg {
  fill: currentColor;
  height: 20px;
  width: 20px;
}
.ys2-comment-menu-list {
  background: var(--ys2-surface);
  border: 1px solid var(--ys2-line);
  border-radius: 6px;
  box-shadow: var(--ys2-shadow);
  display: flex;
  flex-direction: column;
  min-width: 76px;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 15;
}
.ys2-comment-menu-list button {
  background: transparent;
  border: 0;
  color: var(--ys2-text);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  padding: 10px 14px;
}
.ys2-comment-menu-list button + button {
  border-top: 1px solid var(--ys2-line);
}
.ys2-comment-menu-list button:hover {
  background: var(--ys2-accent-soft);
}

/* 回覆框 */
.ys2-comment-reply-box {
  margin: 8px 0 0 62px;
  padding-right: 44px;
}
.ys2-comment-reply-close {
  background: transparent;
  border: 0;
  color: var(--ys2-muted);
  cursor: pointer;
  padding: 4px;
  position: absolute;
  right: 12px;
  top: 12px;
}
.ys2-comment-reply-close svg {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
  width: 22px;
}

/* 空态、更多、提示 */
.ys2-comment-empty {
  color: var(--ys2-muted);
  margin: 22px 0 6px;
  text-align: center;
}
.ys2-comment-empty button {
  background: transparent;
  border: 0;
  color: var(--ys2-comment-pink);
  cursor: pointer;
  font: inherit;
  margin-left: 8px;
}
.ys2-comment-load-more {
  background: var(--ys2-bg);
  border: 1px solid var(--ys2-line);
  border-radius: 6px;
  color: var(--ys2-text);
  cursor: pointer;
  display: block;
  font: inherit;
  margin: 16px auto 0;
  padding: 9px 28px;
}
.ys2-comment-toast {
  background: rgba(0, 0, 0, 0.78);
  border-radius: 6px;
  color: #fff;
  left: 50%;
  margin: 0;
  padding: 10px 18px;
  position: fixed;
  top: 110px;
  transform: translateX(-50%);
  z-index: 60;
}

/* 举报弹窗 */
.ys2-comment-dialog {
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 70;
}
.ys2-comment-dialog form {
  background: var(--ys2-surface);
  border-radius: 12px;
  box-shadow: var(--ys2-shadow);
  color: var(--ys2-text);
  max-width: calc(100vw - 32px);
  padding: 22px 24px;
  width: 440px;
}
.ys2-comment-dialog h3 {
  font-size: 18px;
  margin: 0 0 10px;
}
.ys2-comment-dialog-quote {
  background: var(--ys2-bg);
  border-radius: 6px;
  color: var(--ys2-muted);
  display: -webkit-box;
  font-size: 14px;
  margin: 0 0 12px;
  overflow: hidden;
  padding: 8px 10px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.ys2-comment-dialog fieldset {
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 12px;
  padding: 0;
}
.ys2-comment-dialog legend {
  font-size: 14px;
  margin-bottom: 8px;
}
.ys2-comment-dialog label {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  gap: 6px;
}
.ys2-comment-dialog textarea {
  background: var(--ys2-bg);
  border: 1px solid var(--ys2-line);
  border-radius: 6px;
  color: var(--ys2-text);
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
  resize: vertical;
  width: 100%;
}
.ys2-comment-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}
.ys2-comment-dialog-actions button:first-child {
  background: transparent;
  border: 1px solid var(--ys2-line);
  border-radius: 4px;
  color: var(--ys2-text);
  cursor: pointer;
  font: inherit;
  padding: 7px 18px;
}
