.cmt {
  margin: 12px 0 28px;
}
.cmt-sec {
  margin-bottom: 12px;
}
.cmt-card {
  display: grid;
  grid-template-areas:
    "head"
    "send"
    "body";
  gap: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px 10px;
  box-shadow: none;
}
.cmt-send {
  grid-area: send;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 4px;
}
.cmt-send__face {
  flex: 0 0 48px;
}
.cmt-send__avatar,
.cmt-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #e3e5e7;
  display: block;
}
.cmt-send__main {
  flex: 1;
  min-width: 0;
}
.cmt-form { margin: 0; }
.cmt-form__wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #f6f7f8;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.cmt-form.is-active .cmt-form__wrap,
.cmt-form__wrap:focus-within {
  border-color: var(--pink);
  background: #fff;
  box-shadow: 0 0 0 2px var(--pink-soft);
}
.cmt-form__field {
  display: block;
  margin: 0;
}
.cmt-form__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.cmt-form__input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  resize: none;
}
.cmt-form__input::placeholder { color: #9499a0; }
.cmt-form__input:focus { outline: none; }
.cmt-form__bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 12px 10px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, max-height 0.25s ease, padding 0.2s ease;
}
.cmt-form.is-active .cmt-form__bar,
.cmt-form__wrap:focus-within .cmt-form__bar,
.cmt-form--verify.is-active .cmt-form__bar,
.cmt-form--verify .cmt-form__wrap:focus-within .cmt-form__bar {
  opacity: 1;
  max-height: none;
  overflow: visible;
  pointer-events: auto;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}
.cmt-form__captcha {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}
.cmt-form__captcha-input {
  width: 96px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font-size: 13px;
}
.cmt-form__captcha-img {
  height: 36px;
  width: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  background: #fff;
}
.cmt-form__btn {
  flex: 0 0 auto;
  min-width: 72px;
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--pink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur) var(--ease), opacity var(--dur) var(--ease), transform 0.15s ease;
}
.cmt-form__btn:hover:not(:disabled) { background: var(--pink-hover); }
.cmt-form__btn:active:not(:disabled) { transform: scale(0.98); }
.cmt-form__btn:disabled,
.cmt-form__btn[data-loading] {
  opacity: 0.65;
  cursor: not-allowed;
}
.cmt-form__btn:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}
.cmt-list {
  display: contents;
  margin-top: 0;
  padding-top: 0;
}
.cmt-list__head {
  grid-area: head;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--border);
}
.cmt-list__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
.cmt-list__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: #f1f2f3;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cmt-list__count {
  font-style: normal;
}
.cmt-list__body {
  grid-area: body;
  min-width: 0;
}
.cmt-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cmt-item:last-child { border-bottom: 0; }
.cmt-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}
.cmt-body { min-width: 0; flex: 1; }
.cmt-body__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  line-height: 1.3;
}
.cmt-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
}
.cmt-time {
  font-size: 12px;
  color: var(--muted);
}
.cmt-text,
.cmt-body p {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
}
.cmt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 20px 16px 18px;
  margin: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}
.cmt-empty__art {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}
.cmt-empty__img {
  display: block;
  width: 88px;
  height: auto;
  opacity: 0.94;
}
.cmt-empty__hint,
.cmt-empty__cta {
  display: none;
}
.cmt-empty__title {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #9499a0;
}
@media (prefers-reduced-motion: reduce) {
  .cmt-form__bar { transition: none; }
  .cmt-empty__cta:active { transform: none; }
}
@media (max-width: 640px) {
  .cmt-card { padding: 14px 14px 8px; }
  .cmt-send { gap: 10px; }
  .cmt-send__face { flex-basis: 40px; }
  .cmt-send__avatar { width: 40px; height: 40px; }
  .cmt-form__bar {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .cmt-form__captcha { margin-right: 0; }
}
/* 播放页评论区（Tab 内 + 旧规则兼容） */
.bili-play .cmt,
.layout.play .cmt {
  margin-top: 0;
}
.cmt--play-tab .cmt-card {
  border: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
}
.cmt--play-tab .cmt-list__head {
  display: none;
}
.bili-play .cmt-list__title,
.layout.play .cmt-list__title {
  font-size: 18px;
  font-weight: 600;
}
.bili-play .cmt-list__title::before,
.layout.play .cmt-list__title::before {
  display: none;
}
.bili-play .cmt-list__badge,
.layout.play .cmt-list__badge {
  background: #f1f2f3;
  color: var(--text2);
  font-weight: 500;
}
