:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --card: #ffffff;
  --ink: #222;
  --sub: #7d7d7d;
  --brand: #ffb000;
  --danger: #ef4444;
  --line: #e9e9e9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.page-wrap {
  width: min(1420px, 100%);
  margin: 0 auto;
  padding: 12px;
}

.status-bar {
  background: #111827;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 14px;
}

.status-bar b {
  color: #22c55e;
}

.im-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 12px;
}

.sidebar,
.chat-panel {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.sidebar {
  padding: 12px;
}

.panel-title {
  margin: 0 0 8px;
  font-size: 18px;
}

.muted {
  color: var(--sub);
  font-size: 12px;
}

.message-list {
  height: 520px;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8f9fb;
  border-radius: 12px 12px 0 0;
}

.msg-item {
  display: flex;
}

.msg-item.mine {
  justify-content: flex-end;
}

.msg-bubble {
  max-width: min(78%, 520px);
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #ebedf0;
}

.msg-item.mine .msg-bubble {
  background: #d9fdd3;
  border-color: #b9efb0;
}

.msg-name {
  font-size: 12px;
  color: #666;
  margin-bottom: 3px;
}

.msg-text {
  line-height: 1.45;
}

.msg-time {
  text-align: right;
  font-size: 11px;
  color: #888;
  margin-top: 3px;
}

.chat-input {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 10px;
  display: flex;
  gap: 8px;
  border-radius: 0 0 12px 12px;
}

.chat-input input,
.field input,
.field textarea,
.field select {
  width: 100%;
  min-width: 0;
  border: 1px solid #d5d8de;
  border-radius: 8px;
  padding: 10px 12px;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.pc-shell {
  background: #f6f1e6;
}

.pc-demo {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 96px 1fr;
  background: #f4efe4;
}

.pc-left-nav {
  background: #efe7d7;
  border-right: 1px solid #e6dcc8;
  padding-top: 24px;
}

.pc-nav-item {
  width: 72px;
  margin: 0 auto 10px;
  text-align: center;
  border-radius: 12px;
  padding: 12px 6px;
  color: #7a7362;
  background: #e9dfcb;
  font-size: 14px;
}

.pc-nav-item.active {
  background: #ffde95;
  color: #664c16;
  font-weight: 700;
}

.pc-main {
  padding: 16px;
}

.pc-card {
  border: 1px solid #f1e3c4;
  background: #fffaf0;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}

.pc-btn {
  width: 100%;
  margin-top: 6px;
  background: var(--brand);
  color: #fff;
}

.pc-btn.red {
  background: var(--danger);
}

.pc-btn.red2 {
  background: #dc2626;
}

.pc-record-panel {
  overflow: hidden;
}

.pc-record-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #ececec;
}

.pc-table-wrap {
  max-height: 620px;
  overflow: auto;
}

.pc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pc-table th,
.pc-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
  white-space: nowrap;
}

.pc-table th {
  position: sticky;
  top: 0;
  background: #fafafa;
  color: #666;
  z-index: 1;
}

.state-ok {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  background: #dcfce7;
  color: #16a34a;
  font-size: 12px;
  font-weight: 700;
}

.field {
  margin-bottom: 10px;
}

.field label {
  display: block;
  color: #6f6f6f;
  font-size: 12px;
  margin-bottom: 4px;
}

.mobile-shell {
  max-width: 390px;
  margin: 0 auto;
  background: #fff;
  border-radius: 24px;
  border: 1px solid #ddd;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.app-shell.mobile-shell {
  max-width: 428px;
}

/* App 外框四角无圆角（含桌面预览宽度） */
body[data-role="app"] .mobile-shell,
body[data-role="app"] .app-shell.mobile-shell {
  border-radius: 0;
}

/* 真机小屏：铺满屏幕 + 适配安全区 */
@media (max-width: 480px) {
  body[data-role="app"] .mobile-shell,
  body[data-role="app"] .app-shell.mobile-shell {
    max-width: none;
    width: 100%;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  body[data-role="app"] .app-view {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  body[data-role="app"] .app-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

/*
 * App WebView / 任意 CSS 宽度：一律铺满视口
 * - 去掉 .page-wrap 的 12px 白边
 * - 去掉 .mobile-shell 428px 版心（避免大屏/WebView 横纵向留白）
 * - 取消桌面预览用的 760px 锁高，改用 100dvh
 */
body[data-role="app"] {
  background: #0f172a;
  /* 与 .dyw-me-hero 顶 padding 一致；滚动态顶栏内边距也用它 */
  --app-me-top-inset: calc(6px + max(env(safe-area-inset-top, 0px), 36px));
  /* 「搜索我的内容」上方额外白条高度（与顶栏同色顶满屏宽） */
  --app-me-sticky-extra-gap: 12px;
}

body[data-role="app"] .page-wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body[data-role="app"] .mobile-shell,
body[data-role="app"] .app-shell.mobile-shell {
  max-width: none;
  width: 100%;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

body[data-role="app"] .app-shell {
  width: 100%;
  height: auto;
  max-height: none;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
}

@media (min-width: 481px) {
  body[data-role="app"] .app-shell {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
  }
}

body[data-role="app"] .status-bar {
  display: none;
}

body[data-role="app"] .app-view[data-app-view="me"] {
  background: #fff;
}

/* App端「我的」页：按参考图 1:1 复刻（仅作用于 app.php）
 * 勿用过大 min-height：会在头像与白色资料卡之间撑出「空蓝条」
 * 高度随内容 + 下内边距；白卡片用负 margin 上压盖住底图
 * Android WebView 常无 safe-area，须 max(...,36px) 顶距
 */
body[data-role="app"] .dyw-me-hero {
  min-height: 0;
  height: auto !important;
  /* max(…,36px)：无刘海时预留状态栏；基数再减小以整体上移 */
  padding: calc(6px + max(env(safe-area-inset-top, 0px), 36px)) 16px 24px;
  background:
    linear-gradient(180deg, rgba(10, 18, 34, 0.08) 0%, rgba(10, 18, 34, 0.18) 100%),
    url("./tuku/IMG_3306(20260408-163329).PNG");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

body[data-role="app"] .app-me-stickybar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: space-between;
  height: auto;
  min-height: 42px;
  /* 顶到视口顶：上方留白与安全区用 padding，整块背景 #fff 横向铺满 */
  padding: calc(var(--app-me-top-inset) + var(--app-me-sticky-extra-gap, 12px)) 12px 10px;
  box-sizing: border-box;
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
}

body[data-role="app"] .app-view[data-app-view="me"].is-stuck .app-me-stickybar {
  display: flex;
}

body[data-role="app"] .app-me-stickybar__name {
  font-size: 17px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.92);
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateY(3px);
}

body[data-role="app"] .app-me-stickybar__right {
  display: inline-flex;
  align-items: flex-end;
  gap: 10px;
}

body[data-role="app"] .app-me-stickybar__search {
  appearance: none;
  border: none;
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.72);
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  max-width: 210px;
  transform: translateY(3px);
}

body[data-role="app"] .app-me-stickybar__search-ico {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
  color: rgba(15, 23, 42, 0.55);
}

body[data-role="app"] .app-me-stickybar__search-text {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-role="app"] .app-me-stickybar__menu {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(15, 23, 42, 0.72);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transform: translateY(3px);
}

body[data-role="app"] .app-me-stickybar__menu .dyw-me-top-ico {
  width: 20px;
  height: 20px;
}

body[data-role="app"] .dyw-me-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

body[data-role="app"] .dyw-me-top-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body[data-role="app"] .dyw-me-pill {
  appearance: none;
  border: none;
  background: rgba(18, 24, 38, 0.26);
  color: rgba(255, 255, 255, 0.92);
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  width: fit-content;
  min-width: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* 我的页-添加朋友：再缩窄一点 */
body[data-role="app"] .dyw-me-pill--friend {
  padding: 0 10px;
  gap: 4px;
}

body[data-role="app"] .dyw-me-pill--visitor b {
  margin-left: 4px;
  font-weight: 600;
}

body[data-role="app"] .dyw-me-pill--visitor .dyw-me-pill-ico {
  width: 24px;
  height: 24px;
}

body[data-role="app"] .dyw-me-pill-ico {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: block;
}

body[data-role="app"] .dyw-me-top-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

body[data-role="app"] .dyw-me-iconbtn {
  appearance: none;
  border: none;
  background: rgba(18, 24, 38, 0.18);
  color: rgba(255, 255, 255, 0.92);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.10);
}

body[data-role="app"] .dyw-me-top-ico {
  width: 20px;
  height: 20px;
  display: block;
}

body[data-role="app"] .dyw-me-head-main {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}

body[data-role="app"] .dyw-me-avatar-wrap {
  position: relative;
  width: 86px;
  height: 86px;
  flex-shrink: 0;
}

body[data-role="app"] .dyw-me-avatar {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.95);
  object-fit: cover;
  background: rgba(31, 41, 55, 0.7);
  display: block;
}

body[data-role="app"] .dyw-me-avatar-plus {
  position: absolute;
  right: -2px;
  bottom: 2px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid #6ab8ef;
  background: #22c55e;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: none;
}

body[data-role="app"] .dyw-me-profile-text {
  min-width: 0;
  color: rgba(255, 255, 255, 0.95);
}

body[data-role="app"] .dyw-me-name-row {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

body[data-role="app"] .dyw-me-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

body[data-role="app"] .dyw-me-verify {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

body[data-role="app"] .dyw-me-caret {
  opacity: 0.9;
  font-size: 14px;
  margin-top: 1px;
}

body[data-role="app"] .dyw-me-vbtn {
  appearance: none;
  border: none;
  background: transparent;
  color: #fff;
  padding: 0;
  margin: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body[data-role="app"] .dyw-me-vbtn-ico {
  width: 30px;
  height: 30px;
  display: block;
}

body[data-role="app"] .dyw-me-id {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
}

body[data-role="app"].app-enterprise-on .dyw-me-id {
  margin-top: 1px;
}

/* 企业模式关闭：抖音号回到更紧凑的原间距 */
body[data-role="app"]:not(.app-enterprise-on) .dyw-me-id {
  margin-top: 2px;
}

body[data-role="app"] .dyw-me-company {
  margin-top: 1px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: -6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

body[data-role="app"] .dyw-me-company-verify {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1d9bf0;
  flex: 0 0 auto;
  transform: translateY(-0.5px);
}

body[data-role="app"] .dyw-me-company-verify svg {
  width: 30px;
  height: 30px;
  display: block;
}

body[data-role="app"] .dyw-me-company-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: -2px;
}

body[data-role="app"]:not(.app-enterprise-on) .dyw-me-company-verify {
  display: none;
}

body[data-role="app"] .dyw-me-card {
  /* 负值越小整块越往下，减轻压住头像；过大负值会把统计区拉到头像上 */
  margin: -10px 0 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 12px 12px 10px;
  box-shadow: none;
  border: none;
  position: relative;
  z-index: 2;
}

body[data-role="app"] .dyw-me-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body[data-role="app"] .dyw-me-stats {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 0 0 auto;
}

body[data-role="app"] .dyw-me-stat {
  text-align: center;
  min-width: 44px;
}

body[data-role="app"] .dyw-me-stat b {
  display: block;
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.05;
}

body[data-role="app"] .dyw-me-stat span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.55);
}

body[data-role="app"] .dyw-me-edit {
  appearance: none;
  border: none;
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.86);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

body[data-role="app"] .dyw-me-bio {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.82);
  line-height: 1.35;
}

body[data-role="app"] .dyw-me-tag {
  margin-top: 8px;
  appearance: none;
  border: none;
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.55);
  border-radius: 2px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body[data-role="app"] .dyw-me-quick {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

body[data-role="app"] .dyw-me-quick-item {
  appearance: none;
  border: none;
  background: transparent;
  padding: 6px 0;
  text-align: center;
  color: rgba(15, 23, 42, 0.86);
}

body[data-role="app"] .dyw-me-quick-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  font-size: 36px;
  line-height: 1;
  margin-bottom: 1px;
}

body[data-role="app"] .dyw-me-quick-svg {
  width: 40px;
  height: 40px;
  display: block;
}

body[data-role="app"] .dyw-me-quick-item b {
  display: block;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-role="app"] .app-works-section {
  margin: 0;
  background: #fff;
}

body[data-role="app"] .dyw-me-tabs {
  --dyw-me-tabs-pad-x: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px var(--dyw-me-tabs-pad-x) 0;
  background: #fff;
  border-top: none;
  border-radius: 0;
  border: none;
  position: sticky;
  top: 0;
  z-index: 19;
}

body[data-role="app"] .app-view[data-app-view="me"].is-stuck .dyw-me-tabs {
  /* 顶栏总高度 ≈ 上内边距 + 工具行(约42px) */
  top: calc(var(--app-me-top-inset) + var(--app-me-sticky-extra-gap, 12px) + 42px);
}

body[data-role="app"] .dyw-me-tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: 12px 0 10px;
  color: rgba(15, 23, 42, 0.55);
  font-size: 16px;
  font-weight: 400;
  position: relative;
  /* 与带 ▾ 的首项同高对齐：避免大字号子元素撑高 line-box 后整颗按钮被父级 flex 居中「压下去」 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body[data-role="app"] .dyw-me-tab.is-on {
  color: rgba(15, 23, 42, 0.92);
}

body[data-role="app"] .dyw-me-tab.is-on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
}

/* 「作品」为首项：下划线向左伸出 tabs 内边距，与屏幕左缘对齐 */
body[data-role="app"] .dyw-me-tabs > .dyw-me-tab.is-on:first-child::after {
  left: calc(-1 * var(--dyw-me-tabs-pad-x));
  border-radius: 0 999px 999px 0;
}

body[data-role="app"] .dyw-me-tab-caret {
  /* 用缩放放大，不占 24px 行盒；避免首 tab 比「日常」等更高导致 align-items:center 错位 */
  display: inline-block;
  font-size: 12px;
  line-height: 1;
  margin-left: 6px;
  opacity: 0.8;
  transform: scale(2);
  transform-origin: 50% 55%;
}

body[data-role="app"] .dyw-me-private-row {
  width: 100%;
  appearance: none;
  border: none;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: none;
  border-bottom: none;
  font-size: 14px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.92);
}

body[data-role="app"] .dyw-me-private-right {
  color: rgba(15, 23, 42, 0.42);
  font-weight: 800;
}

body[data-role="app"] .dyw-me-grid {
  background: #fff;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 0;
}

body[data-role="app"] .dyw-me-grid .app-work-card {
  aspect-ratio: 3 / 4;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body[data-role="app"] .dyw-me-grid .app-work-play {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

body[data-role="app"] .dyw-me-grid .app-work-play .dyw-play-ico {
  width: 12px;
  height: 12px;
}

body[data-role="app"] .app-works-empty {
  text-align: center;
  color: rgba(15, 23, 42, 0.55);
  font-size: 12px;
  font-weight: 600;
  padding: 18px 0;
  background: #fff;
}

body[data-role="app"] .app-works-empty.is-empty {
  padding: 36px 0;
}

.app-shell {
  min-height: 760px;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #f5f6f8;
}

/* App端：容器高度
   - 桌面预览：固定高度，方便对照稿
   - 真机（尤其安卓 WebView）：用视口高度自适应，避免被 760px 锁死
*/
@media (min-width: 481px) {
  body[data-role="app"] .app-shell {
    height: 760px;
    min-height: 760px;
    max-height: 760px;
  }
}

@media (max-width: 480px) {
  body[data-role="app"] .app-shell {
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
  }
}

.app-view {
  display: none;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 78px;
}

.app-view[data-app-view="messages"] {
  position: relative;
}

/* App端：底部导航更紧凑，减少与内容空白（含桌面预览） */
body[data-role="app"] .app-view {
  padding-bottom: 56px;
}

.app-view.is-active {
  display: block;
}

/* 覆盖通用激活态：消息页必须保持纵向flex，列表才能内部滚动 */
body[data-role="app"] .app-view[data-app-view="messages"].is-active {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

/* 我的页：允许内部滚动查看更多作品（隐藏滚动条但可滚动） */
body[data-role="app"] .app-view[data-app-view="me"].is-active {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body[data-role="app"] .app-view[data-app-view="me"].is-active::-webkit-scrollbar,
body[data-role="app"] .app-view[data-app-view="me"].is-active::-webkit-scrollbar-thumb,
body[data-role="app"] .app-view[data-app-view="me"].is-active::-webkit-scrollbar-track,
body[data-role="app"] .app-view[data-app-view="me"].is-active::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.mobile-header {
  height: 182px;
  background: linear-gradient(180deg, #6b7280 0%, #1f2937 52%, #0b0f18 100%);
  color: #fff;
  padding: 14px 14px 12px;
  position: relative;
}

.mobile-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: linear-gradient(180deg, rgba(11, 15, 24, 0) 0%, rgba(11, 15, 24, 0.35) 100%);
  pointer-events: none;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  background: #1f2937;
  object-fit: cover;
}

.profile-card {
  margin: -18px 10px 10px;
  background: #fff;
  border-radius: 16px;
  padding: 10px 12px 12px;
  border: 1px solid #eee;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.menu-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-top: 8px;
}

.app-works-section {
  margin: 0 10px 10px;
}

.app-works-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.app-work-pill {
  border: none;
  border-radius: 999px;
  background: #eef2ff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
}

.app-work-pill.is-on {
  background: #fe2c55;
  color: #fff;
}

.app-works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.app-work-card {
  aspect-ratio: 3 / 4;
  border-radius: 9px;
  background: linear-gradient(145deg, #2a2f45 0%, #1a1e2e 100%);
}

.web-shell {
  background: linear-gradient(180deg, #1f2a75 0%, #101827 100%);
  min-height: 680px;
  border-radius: 18px;
  padding: 18px;
  color: #fff;
}

.web-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.bubble-menu {
  background: rgba(10, 10, 14, 0.9);
  border-radius: 16px;
  padding: 12px;
  width: 300px;
}

.bubble-item {
  padding: 9px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bubble-item:last-child {
  border-bottom: 0;
}

.web-page-wrap {
  max-width: 1120px;
}

.web-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.web-search {
  width: 220px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 10px 14px;
}

.web-icons {
  opacity: 0.92;
  font-size: 14px;
}

.web-nav-tabs {
  display: flex;
  gap: 28px;
  opacity: 0.9;
  margin: 6px 0 18px;
}

.web-float-layout {
  min-height: 520px;
  position: relative;
}

.web-send-box {
  position: absolute;
  right: 0;
  bottom: 8px;
  width: 380px;
  display: flex;
  gap: 8px;
}

.web-send-box input {
  flex: 1;
  border-radius: 10px;
  border: 1px solid #d5d8de;
  padding: 10px 12px;
}

.dm-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 8px;
  padding: 8px 4px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dm-item:last-child {
  border-bottom: 0;
}

.dm-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #555;
}

.dm-name {
  font-size: 14px;
  color: #fff;
}

.dm-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.dm-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.dy-header {
  height: 166px;
  background: linear-gradient(180deg, #8d8d8d 0%, #2a2a2a 75%, #1a1a1a 100%);
}

.dy-top-icons {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.dy-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}

.dy-profile-text {
  margin-top: 6px;
}

.dy-name {
  font-size: 54px;
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: 0.005em;
}

.dy-id {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.92;
}

.dy-counts {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.dy-counts b {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
}

.dy-counts .muted {
  margin-top: 4px;
  font-size: 18px;
  color: #374151;
}

.dy-bio {
  margin-top: 7px;
  font-size: 15px;
  line-height: 1.4;
}

.dy-msg-section {
  padding: 4px 12px 12px;
}

.dy-msg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 6px;
}

.dy-msg-badge {
  min-width: 22px;
  border-radius: 999px;
  text-align: center;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
}

.dy-msg-list {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px 10px 0 0;
  max-height: 250px;
  overflow: auto;
}

.dy-msg-list .dm-item {
  border-bottom: 1px solid #f0f0f0;
  padding: 10px 10px;
  grid-template-columns: 40px 1fr auto;
}

.dy-msg-list .dm-name {
  color: #111;
  font-weight: 700;
}

.dy-msg-list .dm-text {
  color: #777;
  max-width: 170px;
}

.dy-msg-list .dm-time {
  color: #999;
}

.dy-input {
  border-radius: 0 0 10px 10px;
}

.app-msg-header {
  background: #fff;
  padding: 8px 14px 6px;
  border-bottom: none;
}

/* App 消息列表顶：与「我的」页「添加朋友」同一垂直基准（--app-me-top-inset） */
body[data-role="app"] .app-msg-header {
  padding-top: var(--app-me-top-inset);
  padding-bottom: 6px;
}

.app-msg-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.app-msg-topbar {
  justify-content: space-between;
  display: flex;
  align-items: center;
  position: relative;
}

.app-msg-top-left,
.app-msg-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-msg-topbtn {
  border: none;
  background: transparent;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #0f172a;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-msg-topbtn svg {
  width: 22px;
  height: 22px;
  display: block;
}

.app-msg-topbtn--menu {
  width: 30px;
  height: 30px;
}

.app-msg-topbtn--menu svg {
  width: 24px;
  height: 24px;
}

.app-msg-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff385c;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  line-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-msg-topbtn.app-msg-topbtn--menu {
  position: relative;
}

.app-msg-topbar h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #0f172a;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.app-msg-content {
  padding: 0;
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* App：顶栏「状态设置 / 互动消息」与 #dmList 同一滚动容器，一起上下滑（不固定顶栏） */
body[data-role="app"] .app-msg-content {
  display: block;
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body[data-role="app"] .app-msg-content::-webkit-scrollbar,
body[data-role="app"] .app-msg-content::-webkit-scrollbar-thumb,
body[data-role="app"] .app-msg-content::-webkit-scrollbar-track,
body[data-role="app"] .app-msg-content::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

body[data-role="app"] .app-msg-fixedpanel {
  background: #fff;
  padding: 8px 14px 10px;
}

/* 让第一排两列的起始位置与下方互动消息的左侧图标对齐 */
body[data-role="app"] .app-msg-shortcuts {
  padding-left: 2px;
}

body[data-role="app"] .app-msg-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding: 6px 2px 12px;
  justify-items: start;
}

body[data-role="app"] .app-msg-shortcut {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(15, 23, 42, 0.86);
}

body[data-role="app"] .app-msg-shortcut-ico {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(15, 23, 42, 0.04);
}

body[data-role="app"] .app-msg-shortcut-ico--gear {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(148, 163, 184, 0.62);
}

body[data-role="app"] .app-msg-shortcut-ico--gear svg {
  width: 50px;
  height: 50px;
  display: block;
}

body[data-role="app"] .app-msg-shortcut-txt {
  font-size: 14px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.76);
}

body[data-role="app"] .app-msg-interactive {
  width: 100%;
  appearance: none;
  border: none;
  background: #fff;
  padding: 8px 2px;
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 10px;
  align-items: center;
  border-top: none;
}

/* 服务消息页：互动消息行与列表头像列对齐 */
body[data-role="app"] .app-msg-interactive--svc {
  padding-left: 14px;
  padding-right: 14px;
  grid-template-columns: 60px 1fr auto;
  gap: 12px;
}

body[data-role="app"] .app-msg-interactive-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  min-height: 60px;
  padding-right: 4px;
}

body[data-role="app"] .app-msg-interactive-ico-circle {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: transparent;
  color: #ea5084;
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-role="app"] .app-msg-interactive-ico-circle svg {
  width: 60px;
  height: 60px;
  display: block;
  overflow: visible;
  transform: scale(1.9) !important;
  transform-origin: 50% 50%;
}

body[data-role="app"] .app-msg-interactive-text b {
  display: block;
  font-size: 17px;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.92);
  margin-bottom: 3px;
}

body[data-role="app"] .app-msg-interactive-text {
  text-align: left;
  justify-self: start;
}

body[data-role="app"] .app-msg-interactive-text small {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: #9aa3af;
  margin-top: 8px;
  line-height: 1.35;
}

body[data-role="app"] .app-msg-interactive-time {
  font-size: 12px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.35);
  padding-right: 0;
}

.app-msg-list {
  background: #fff;
  min-height: 0;
  max-height: none;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

body[data-role="app"] .app-msg-list {
  flex: none;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow-x: hidden;
  overflow-y: visible;
  touch-action: pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* App - 服务消息（企业消息风格） */
body[data-role="app"] .app-svc {
  flex: none;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: visible;
  touch-action: pan-y;
  background: #fff;
  padding-bottom: 10px;
}

body[data-role="app"] .app-svc-metrics,
body[data-role="app"] .app-svc-tabs,
body[data-role="app"] .app-svc-list,
body[data-role="app"] .app-msg-interactive--svc {
  max-width: 100%;
  box-sizing: border-box;
}

body[data-role="app"] .app-svc::-webkit-scrollbar,
body[data-role="app"] .app-svc::-webkit-scrollbar-thumb,
body[data-role="app"] .app-svc::-webkit-scrollbar-track,
body[data-role="app"] .app-svc::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

body[data-role="app"] .app-svc-metrics {
  margin: 12px 14px 10px;
  background: #f6f7f9;
  border-radius: 12px;
  padding: 12px 8px 12px 10px;
  display: grid;
  grid-template-columns: minmax(48px, 56px) minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  overflow: hidden;
}

body[data-role="app"] .app-svc-metrics__label {
  color: #111827;
  font-weight: 800;
  line-height: 1.05;
  font-size: 15px;
}

body[data-role="app"] .app-svc-metrics__items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  row-gap: 8px;
  column-gap: 18px;
  min-width: 0;
}

body[data-role="app"] .app-svc-metric {
  text-align: center;
  min-width: 0;
}

body[data-role="app"] .app-svc-metric__name {
  color: #6b7280;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-role="app"] .app-svc-metric__value {
  color: #111827;
  font-weight: 800;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.25;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  column-gap: 3px;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}

body[data-role="app"] .app-svc-metric__value > span {
  white-space: nowrap;
}

body[data-role="app"] .app-svc-metric__bad {
  color: #ef4444;
  font-weight: 800;
  font-size: 11px;
  margin-left: 0;
  white-space: nowrap;
}

body[data-role="app"] .app-svc-metrics__chev {
  color: #9ca3af;
  font-size: 20px;
  text-align: right;
}

body[data-role="app"] .app-svc-tabs {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 14px 10px;
  border-bottom: 1px solid #f1f5f9;
  align-items: flex-end;
}

body[data-role="app"] .app-svc-tab {
  border: 0;
  background: transparent;
  color: #6b7280;
  font-weight: 500;
  font-size: 16px;
  padding: 10px 0 8px;
  position: relative;
  cursor: pointer;
  min-width: 52px;
  text-align: center;
}

body[data-role="app"] .app-svc-tab.is-on {
  color: #111827;
}

body[data-role="app"] .app-svc-tab.is-on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 999px;
  background: #111827;
}

body[data-role="app"] .app-svc-tab-badge {
  position: absolute;
  top: 2px;
  right: -12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff385c;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  margin-left: 0;
  transform: scale(0.95);
}

/* App - 底部导航「消息」角标 */
body[data-role="app"] .app-nav-badge {
  position: absolute;
  top: -8px;
  right: -14px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff385c;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  line-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body[data-role="app"] .app-svc-list {
  padding: 0;
}

body[data-role="app"] .app-svc-item {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid #f5f7fa;
  min-width: 0;
  align-items: center;
}

body[data-role="app"] .app-svc-ico {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

body[data-role="app"] .app-svc-ico--pink {
  background: radial-gradient(circle at 30% 30%, #ff6b93, #ff2e59 60%, #db1440);
}

body[data-role="app"] .app-svc-ico--blue {
  background: radial-gradient(circle at 30% 30%, #63b3ff, #2b6cff 60%, #1e4dd8);
}

body[data-role="app"] .app-svc-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

body[data-role="app"] .app-svc-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

body[data-role="app"] .app-svc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

body[data-role="app"] .app-svc-title {
  color: #111827;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

body[data-role="app"] .app-svc-sub {
  color: #9aa3af;
  font-size: 14px;
  margin-top: 8px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  max-width: none;
}

body[data-role="app"] .app-svc-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 900;
  margin-left: 6px;
  vertical-align: middle;
}

body[data-role="app"] .app-svc-meta {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-shrink: 0;
  min-width: 0;
}

body[data-role="app"] .app-svc-time {
  color: #c5cbd5;
  font-size: 13px;
  white-space: nowrap;
}

body[data-role="app"] .app-svc-pill {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
}

body[data-role="app"] .app-svc-pill--hot {
  background: #ff385c;
}

body[data-role="app"] .app-svc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff385c;
}

.app-msg-list .dm-item {
  border-bottom: 1px solid #f5f7fa;
  padding: 8px 14px;
  /* 两列：预览独占正文列整宽，省略号可与上行时间右缘对齐 */
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 12px;
  cursor: pointer;
  min-width: 0;
  align-items: center;
}

.app-msg-list .dm-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.app-msg-list .app-msg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.app-msg-list .dm-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
}

.app-msg-list .dm-name {
  color: #0f172a;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.app-msg-list .dm-text {
  color: #9aa3af;
  width: 100%;
  max-width: none;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 时间与未读点同一行，避免纵向叠高把预览撑下去（恢复改布局前的行高） */
.app-msg-list .app-msg-meta {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-shrink: 0;
  min-width: 0;
}

.app-msg-list .dm-time {
  color: #c5cbd5;
  font-size: 13px;
  white-space: nowrap;
}

.app-msg-list .app-msg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff385c;
  opacity: 0;
}

.app-msg-list .dm-item.has-unread .app-msg-dot {
  opacity: 1;
}

.app-chat-detail {
  background: #f2f2f2;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  z-index: 20;
}

.app-chat-detail[hidden] {
  display: none !important;
}

.app-shell.app-chat-open .app-bottom-nav {
  display: none !important;
}

.app-shell.app-chat-open .app-view[data-app-view="messages"] {
  padding-bottom: 0 !important;
}

.app-shell.app-chat-open .app-msg-header,
.app-shell.app-chat-open .app-msg-content {
  display: none !important;
}

.app-chat-head {
  height: 64px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  display: grid;
  grid-template-columns: 44px 38px 1fr 36px 36px;
  gap: 6px;
  align-items: center;
  padding: 0 12px 0 8px;
  background: #f2f2f2;
}

/* 会话/服务消息顶栏：与「我的」页添加朋友同高（App） */
body[data-role="app"] .app-chat-head {
  height: auto;
  min-height: 64px;
  padding-top: var(--app-me-top-inset);
  padding-right: 12px;
  padding-bottom: 8px;
  padding-left: 8px;
  box-sizing: border-box;
}

.app-chat-back {
  border: none;
  background: transparent;
  color: #111827;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0;
}

.app-chat-back svg {
  width: 24px;
  height: 24px;
  display: block;
}

.app-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.app-chat-name {
  font-size: 18px;
  font-weight: 650;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-chat-iconbtn {
  border: none;
  background: transparent;
  color: #111827;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0;
}

.app-chat-iconbtn svg {
  width: 22px;
  height: 22px;
  display: block;
}

.app-chat-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 10px 12px;
  background: #f2f2f2;
}

/* App聊天页：隐藏滚动条，但保留滚动能力（鼠标滚轮/触摸） */
body[data-role="app"] .app-chat-thread {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body[data-role="app"] .app-chat-thread::-webkit-scrollbar,
body[data-role="app"] .app-chat-thread::-webkit-scrollbar-thumb,
body[data-role="app"] .app-chat-thread::-webkit-scrollbar-track,
body[data-role="app"] .app-chat-thread::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.app-chat-notice {
  padding: 18px 18px 8px;
  color: rgba(15, 23, 42, 0.45);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.app-chat-notice-text {
  margin: 0 auto 10px;
  max-width: 320px;
}

.app-chat-sep {
  margin: 14px 0;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.38);
}

.app-chat-tip {
  margin: 0 auto;
  max-width: 320px;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.48);
}

.app-chat-thread-list {
  padding: 0 0 8px;
}

/* App 私信：对方未回复时，会话顶部安全提示（首条消息上方不重复居中时间） */
body[data-role="app"] .app-chat-first-send-hint {
  text-align: center;
  color: rgba(15, 23, 42, 0.5);
  font-size: 13px;
  line-height: 1.55;
  padding: 6px 16px 12px;
  max-width: 340px;
  margin: 0 auto;
}

.app-chat-compose {
  border-top: none;
  /* 聊天页底部留白：与“我/消息”页底部导航占位一致 */
  padding: 0 12px calc(28px + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 0;
  background: #f8f8f8;
  align-items: center;
}

.app-chat-actions {
  padding: 8px 12px 6px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: #f2f2f2;
}

/* 服务消息会话需隐藏操作条：作者样式 display:grid 会盖掉 [hidden] 的 display:none */
#appChatActions[hidden] {
  display: none !important;
}

.app-chat-action {
  border: none;
  background: #fff;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(15, 23, 42, 0.82);
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.app-chat-action-ico {
  font-size: 18px;
  opacity: 0.8;
}

.app-chat-action-ico--delete svg {
  width: 17px;
  height: 17px;
  display: block;
  flex-shrink: 0;
  opacity: 0.85;
}

.app-chat-tool {
  border: none;
  background: transparent;
  color: rgba(15, 23, 42, 0.82);
  cursor: pointer;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0;
}

.app-chat-input-wrap .app-chat-tool {
  flex: 0 0 auto;
}

.app-chat-tool svg {
  width: 36px;
  height: 36px;
  display: block;
}

.app-chat-tool--camera {
  width: 56px;
  height: 56px;
  background: transparent;
  box-shadow: none;
}

.app-chat-input-wrap {
  flex: 1;
  min-width: 0;
  background: #fff;
  border-radius: 8px;
  height: 44px;
  display: flex;
  align-items: center;
  /* 左侧贴相机；右侧顶到白底条边缘 */
  padding: 6px 0 6px 0;
  gap: 0;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.05);
  overflow: visible;
}

.app-chat-input-wrap .app-chat-tool--camera {
  width: 56px;
  height: 56px;
  /* 56px 热区里图标约 36px 居中，负边距越大文案越贴近可见图标 */
  margin-right: -16px;
}

.app-chat-input-wrap .app-chat-tool--camera svg {
  width: 36px;
  height: 36px;
}

.app-chat-input-wrap .app-chat-tool {
  margin-top: -6px;
  margin-bottom: -6px;
}

.app-chat-input-wrap .app-chat-tools-right {
  display: flex;
  align-items: center;
  gap: 0 !important;
  margin-left: auto;
  flex-shrink: 0;
}

.app-chat-input-wrap .app-chat-tools-right .app-chat-tool {
  width: 56px;
  height: 56px;
}

.app-chat-input-wrap .app-chat-tools-right .app-chat-tool svg {
  width: 36px;
  height: 36px;
}

.app-chat-input-wrap .app-chat-tools-right .app-chat-tool + .app-chat-tool {
  margin-left: -22px;
}

.app-chat-compose input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  line-height: 1.35;
  color: #111827;
}

.app-chat-compose input::placeholder {
  color: rgba(15, 23, 42, 0.38);
  font-size: 15px;
}

.app-chat-send {
  display: none;
}

.app-chat-detail .thread-msg {
  display: flex;
  gap: 10px;
  margin: 14px 0;
  /* 强制顶部对齐头像：避免被后面的通用 .thread-msg { align-items:flex-end } 覆盖 */
  align-items: flex-start !important;
}

.app-chat-detail .thread-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  /* 头像自身也强制顶对齐，避免被单条消息/通用样式拉偏 */
  align-self: flex-start !important;
  margin-top: 0 !important;
}

.app-chat-detail .thread-bubble {
  max-width: 78%;
  background: #fff;
  color: #111827;
  border-radius: 12px;
  padding: 8px 14px;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.06);
}

.app-chat-detail .thread-msg.mine .thread-bubble {
  background: #4c7dff;
  color: #fff;
}

.app-chat-detail .thread-text {
  font-size: 18px;
  line-height: 1.25;
}

/* App 私信：卡片消息样式（仅 app 端渲染） */
body[data-role="app"] .app-chat-detail .thread-bubble.thread-bubble--card {
  /* 卡片气泡顶对齐头像：勿用负 top，否则占位高度仍在，与下一条消息之间会出现大块空白 */
  padding: 0 !important;
  margin-top: 0 !important;
  position: static;
  top: auto;
  background: transparent;
  box-shadow: none;
  flex: 0 1 auto;
  min-width: 0;
  /* 与上方文字气泡同一套宽度：普通气泡随内容变宽，卡片需显式拉满否则会变窄 */
  width: 78%;
  max-width: 78% !important;
}

/* 卡片顶对齐时避免被内联/其它规则残留影响 */
body[data-role="app"] .app-chat-detail .thread-msg .thread-bubble.thread-bubble--card {
  align-self: flex-start !important;
}

/* 卡片：顶端与头像顶端对齐（mine/other 都生效） */
body[data-role="app"] .app-chat-detail .thread-msg .thread-bubble.thread-bubble--card {
  align-self: flex-start;
}

/* mine 侧有默认气泡 padding/background，需强制覆盖 */
body[data-role="app"] .app-chat-detail .thread-msg.mine .thread-bubble.thread-bubble--card {
  padding: 0 !important;
  background: transparent;
  box-shadow: none;
  margin-top: 0 !important;
}

/* 卡片：去掉 .thread-text 行盒顶缝（否则头像对齐的是气泡顶，视觉上卡片比头像低一截） */
body[data-role="app"] .app-chat-detail .thread-bubble.thread-bubble--card .thread-text {
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0;
  font-size: 0;
  white-space: normal;
  display: block;
}

body[data-role="app"] .app-chat-detail .app-card-msg {
  margin: 0;
}

body[data-role="app"] .app-chat-detail .app-card-msg {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  /* 高度与左侧图标块一致 */
  height: 64px;
  /* 左侧不留白，让图标贴边；右侧保留内边距 */
  padding: 0 16px 0 0;
  box-shadow: none;
  min-width: 0;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

body[data-role="app"] .app-chat-detail .app-card-msg:active {
  filter: brightness(0.98);
}

body[data-role="app"] .app-chat-detail .app-card-msg__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body[data-role="app"] .app-chat-detail .app-card-msg__ico {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 64px;
}

body[data-role="app"] .app-chat-detail .app-card-msg__wx {
  width: 42px;
  height: 42px;
  color: #fff;
}

body[data-role="app"] .app-chat-detail .app-card-msg__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 12px;
  background: #22c55e;
}

body[data-role="app"] .app-chat-detail .app-card-msg__title {
  font-size: 17px;
  font-weight: 800;
  color: #111;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-role="app"] .app-chat-detail .app-card-msg__desc {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(17, 17, 17, 0.55);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-chat-detail .thread-time {
  display: none;
}

.app-chat-detail .thread-msg.mine {
  flex-direction: row-reverse;
}

.app-bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74px;
  background: #fff;
  border-top: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 2px 8px;
}

.app-nav-item {
  border: none;
  background: transparent;
  color: #6b7280;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.app-nav-item span {
  font-size: 17px;
  line-height: 1;
}

.app-nav-item b {
  font-size: 11px;
  font-weight: 600;
}

/* App底部导航：参考 appwode，仅显示文字（中间发布按钮除外） */
body[data-role="app"] .app-bottom-nav .app-nav-item:not(.app-nav-plus) > span {
  display: none;
}

body[data-role="app"] .app-bottom-nav .app-nav-item:not(.app-nav-plus) {
  gap: 0;
  padding-top: 10px;
}

body[data-role="app"] .app-bottom-nav .app-nav-item:not(.app-nav-plus) b {
  font-size: 18px;
  font-weight: 600;
  transform: translateY(-6px);
}

/* App底部导航：去掉顶部分隔线 + 整体内容上移 */
body[data-role="app"] .app-bottom-nav {
  border-top: none;
  height: 52px;
  padding: 6px 0 0;
  box-shadow: none !important;
  outline: none;
  transform: translateY(-1px);
  z-index: 60;
}

/* 彻底遮掉底部导航上方可能出现的灰线（边框/阴影/背景缝） */
body[data-role="app"] .app-bottom-nav::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -3px;
  height: 3px;
  background: #fff;
  pointer-events: none;
}

body[data-role="app"] .app-bottom-nav .app-nav-item {
  justify-content: flex-start;
}

body[data-role="app"] .app-bottom-nav .app-nav-plus {
  margin-top: -14px;
}

body[data-role="app"] .app-bottom-nav .app-nav-item:not(.app-nav-plus) {
  padding-top: 0;
}

body[data-role="app"] .app-bottom-nav .app-nav-item:not(.app-nav-plus) b {
  transform: none;
  line-height: 1;
}

.app-nav-item.is-active {
  color: #111827;
  font-weight: 700;
}

.app-nav-plus span {
  font-size: 20px;
  font-weight: 700;
}

.app-nav-plus .app-nav-plus-ico {
  width: 64px;
  height: 64px;
  display: block;
  color: #111827;
  transform: translateY(-6px);
}

body[data-role="app"] .app-nav-plus {
  overflow: visible;
}

/* ========== ?????????????+ ???? ========== */
.dyw-body {
  margin: 0;
  min-height: 100vh;
  background: #161823;
  color: #fff;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Web 主页面：隐藏右侧滚动条（保持可滚动） */
body[data-role="web"] {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body[data-role="web"]::-webkit-scrollbar,
body[data-role="web"]::-webkit-scrollbar-thumb,
body[data-role="web"]::-webkit-scrollbar-track,
body[data-role="web"]::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.dyw-body .page-wrap {
  max-width: none;
  padding: 0;
}

.dyw-app {
  display: flex;
  min-height: 100vh;
  background: #161823;
  /* 参考抖音 Web：侧栏与主内容间距略收紧 */
  gap: 64px;
}

/* Web 端：保持默认铺满，不做整体 transform 缩放 */

.dyw-sidebar {
  width: 164px;
  flex-shrink: 0;
  background: #161823;
  border-right: none;
  display: flex;
  flex-direction: column;
  padding: 14px 10px 12px;
  justify-content: flex-start;
  /* 侧栏随页面滚动时保持同屏，底部图标贴底 */
  position: sticky;
  top: 0;
  height: 100vh;
}

.dyw-side-brand {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px 8px;
  color: #f4f7ff;
  text-decoration: none;
  font-size: 34px;
  line-height: 1;
}

.dyw-side-brand-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #0f121d;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.dyw-side-brand-ico svg {
  width: 18px;
  height: 18px;
  filter: drop-shadow(-0.5px 0 0 rgba(0, 242, 234, 0.7)) drop-shadow(0.5px 0 0 rgba(255, 48, 96, 0.7));
}

.dyw-side-brand-text {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.dyw-side-brand-ico-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
  display: block;
}

.dyw-side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  padding-top: 6px;
}

.dyw-side-sep {
  height: 1px;
  margin: 10px 10px;
  background: rgba(255, 255, 255, 0.08);
}

.dyw-side-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.1;
  text-shadow: -0.35px 0 0 rgba(0, 242, 234, 0.22), 0.35px 0 0 rgba(255, 48, 96, 0.2);
  transition: color 0.15s ease, text-shadow 0.15s ease, filter 0.15s ease;
}

.dyw-side-item:not(.is-active):hover {
  color: rgba(255, 255, 255, 0.86);
  text-shadow: -0.35px 0 0 rgba(0, 242, 234, 0.28), 0.35px 0 0 rgba(255, 48, 96, 0.25);
}

.dyw-jingxuan-label {
  color: rgba(235, 238, 245, 0.78);
  text-shadow: -0.45px 0 0 rgba(0, 242, 234, 0.35), 0.45px 0 0 rgba(255, 32, 96, 0.32);
}

.dyw-side-item.is-active .dyw-jingxuan-label {
  color: rgba(248, 252, 255, 0.98);
  text-shadow: -0.75px 0 0 rgba(0, 242, 234, 0.65), 0.75px 0 0 rgba(255, 32, 96, 0.6);
}

/* 「AI」占位与侧栏 SVG 图标同宽同高，保证与精选/推荐 左对齐 */
.dyw-aisearch-ai {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
}

.dyw-side-item:not(.is-active) .dyw-aisearch-ai {
  color: rgba(255, 255, 255, 0.72);
  text-shadow: -0.35px 0 0 rgba(0, 242, 234, 0.25), 0.35px 0 0 rgba(255, 48, 96, 0.22);
}

.dyw-side-item.is-active .dyw-aisearch-ai {
  color: #fff;
  text-shadow: none;
}

.dyw-aisearch-cn {
  color: rgba(235, 238, 245, 0.78);
  text-shadow: -0.45px 0 0 rgba(0, 242, 234, 0.35), 0.45px 0 0 rgba(255, 32, 96, 0.32);
}

.dyw-side-item.is-active .dyw-aisearch-cn {
  color: rgba(248, 252, 255, 0.98);
  text-shadow: -0.75px 0 0 rgba(0, 242, 234, 0.65), 0.75px 0 0 rgba(255, 32, 96, 0.6);
}

.dyw-side-item.sm {
  padding: 7px 10px;
  font-size: 14px;
}

.dyw-side-item.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  text-shadow: none;
}

.dyw-side-item.is-active:hover {
  color: #fff;
}

.dyw-side-item:not(.is-active) .dyw-ico-svg.dyw-ico-nav {
  color: rgba(255, 255, 255, 0.7);
  filter: drop-shadow(-0.35px 0 0 rgba(0, 242, 234, 0.32)) drop-shadow(0.35px 0 0 rgba(255, 48, 96, 0.28));
}

.dyw-side-item:not(.is-active):hover .dyw-ico-svg.dyw-ico-nav {
  color: rgba(255, 255, 255, 0.84);
  filter: drop-shadow(-0.35px 0 0 rgba(0, 242, 234, 0.38)) drop-shadow(0.35px 0 0 rgba(255, 48, 96, 0.33));
}

.dyw-side-item.is-active .dyw-ico-svg.dyw-ico-nav {
  color: #fff;
  filter: none;
}

.dyw-ico-svg {
  flex-shrink: 0;
  display: block;
  overflow: visible;
}

.dyw-ico-svg.dyw-ico-nav {
  width: 20px;
  height: 20px;
  overflow: visible;
}

/* Tab/胶囊锁：专用 class，尺寸由下方规则控制，不受侧栏 20×20 影响 */
.dyw-ico-svg.dyw-ico-tablock {
  overflow: visible;
}

/* 侧栏图标：各 SVG 在 800 坐标系里占比不同，用 scale 统一到接近的视觉体量（放映厅/直播约 1.0） */
.dyw-side-nav .dyw-ico-svg.dyw-ico-nav {
  transform-origin: center center;
}

.dyw-side-ico-jingxuan .dyw-ico-svg.dyw-ico-nav {
  transform: scale(0.9);
}

.dyw-side-ico-tuijian .dyw-ico-svg.dyw-ico-nav {
  transform: scale(0.88);
}

.dyw-side-ico-aisearch .dyw-ico-svg.dyw-ico-nav {
  transform: scale(0.72);
}

.dyw-side-ico-follow .dyw-ico-svg.dyw-ico-nav {
  transform: scale(0.93);
}

.dyw-side-ico-friend .dyw-ico-svg.dyw-ico-nav {
  transform: scale(1.14);
}

.dyw-side-ico-mine .dyw-ico-svg.dyw-ico-nav {
  transform: scale(0.97);
}

.dyw-side-ico-live .dyw-ico-svg.dyw-ico-nav,
.dyw-side-ico-cinema .dyw-ico-svg.dyw-ico-nav {
  transform: scale(1);
}

.dyw-side-ico-drama .dyw-ico-svg.dyw-ico-nav {
  transform: scale(0.94);
}

.dyw-side-ico-game .dyw-ico-svg.dyw-ico-nav {
  transform: scale(1.1);
}

.dyw-ico-svg.dyw-ico-act {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.92);
}

.dyw-side-bottom {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 4px;
}

.dyw-side-foot {
  margin-top: auto;
  padding: 14px 5px 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.dyw-foot-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.65);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.dyw-foot-dot .dyw-ico-nav {
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.65);
  filter: drop-shadow(-0.35px 0 0 rgba(0, 242, 234, 0.32)) drop-shadow(0.35px 0 0 rgba(255, 48, 96, 0.28));
}

.dyw-foot-dot-msg::after {
  content: "";
  width: 6px;
  height: 6px;
  background: #ff2d55;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  right: 2px;
}

.dyw-main {
  flex: 1;
  min-width: 0;
  /* 原 20px + 约一字宽，整体右缘内收 */
  --dyw-main-pad-right: calc(20px + 1em);
  padding: 0 var(--dyw-main-pad-right) 24px 0;
  overflow-x: hidden;
  position: relative;
  background: #161823;
}

.dyw-main::before {
  content: none;
}

/* 顶栏 + 资料区同一光晕，从主栏最顶铺满（顶栏透明叠在伪元素上，z-index 保证可点） */
.dyw-main-hero {
  position: relative;
  /* 避免创建独立层叠上下文，防止 fixed 顶栏被作品区压住 */
  isolation: auto;
  /* 允许顶栏 sticky 吸顶（overflow 会破坏 sticky 的参照） */
  overflow: visible;
  margin: 0 calc(-1 * var(--dyw-main-pad-right)) 0 0;
}

.dyw-main-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 75% 130% at 88% 32%, rgba(124, 92, 255, 0.44) 0%, transparent 56%),
    radial-gradient(ellipse 55% 95% at 96% 14%, rgba(236, 72, 153, 0.24) 0%, transparent 46%),
    radial-gradient(ellipse 50% 88% at 72% 48%, rgba(56, 189, 248, 0.2) 0%, transparent 50%),
    linear-gradient(105deg, #161823 0%, rgba(22, 24, 35, 0.98) 38%, rgba(26, 24, 42, 0.96) 72%, rgba(22, 22, 38, 0.99) 100%);
}

.dyw-top {
  position: relative;
  z-index: 5;
  margin-bottom: 0;
  padding-top: 4px;
  padding-bottom: 2px;
  background: transparent;
  isolation: isolate;
}

/* 向下滚动后：顶栏浮到页面最上层；回到顶部时移除此状态 */
body[data-role="web"] .dyw-top.is-floating {
  position: fixed;
  top: 0;
  left: calc(164px + 64px);
  right: 0;
  z-index: 99999;
  background: #161823;
  isolation: isolate;
}

body[data-role="web"] .dyw-main.is-topbar-floating {
  /* 吸顶条压低：仅比搜索框底部多一点留白 */
  padding-top: 60px;
}

/* 滚动吸顶时隐藏“保存登录信息”行，减少顶栏占位 */
body[data-role="web"] .dyw-top.is-floating .dyw-save-login-row--under-client {
  display: none;
}

/* 吸顶态缩短顶栏高度，避免底色过高 */
body[data-role="web"] .dyw-top.is-floating .dyw-top-inner {
  padding-bottom: 8px;
}

@media (max-width: 900px) {
  body[data-role="web"] .dyw-top.is-floating {
    left: 0;
    right: 0;
  }
  body[data-role="web"] .dyw-main.is-topbar-floating {
    padding-top: 0;
  }
}

.dyw-top-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding-bottom: 42px;
}

.dyw-top-spacer {
  display: none;
}

/* 约占顶栏总宽约 38%，水平居中（与右侧工具区互不挤压） */
.dyw-search-wrap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: min(38%, calc(100% - 520px));
  min-width: 240px;
  max-width: 720px;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
  pointer-events: none;
}

.dyw-search-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  /* 底层暗透 + 顶层浅色蒙版（略提亮，贴近参考图二） */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.045) 45%, rgba(255, 255, 255, 0.06) 100%),
    rgba(22, 24, 35, 0.34);
  border-radius: 10px;
  padding: clamp(8px, 0.9vw, 11px) clamp(10px, 1.1vw, 14px) clamp(8px, 0.9vw, 11px) clamp(14px, 1.6vw, 22px);
  color: rgba(198, 200, 208, 0.98);
  font-size: clamp(12px, 1.0vw, 14px);
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dyw-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  margin: 0;
  padding: 0;
  background: transparent;
  color: rgba(202, 204, 212, 0.98);
  font-family: inherit;
  font-size: clamp(12px, 1.0vw, 14px);
  font-weight: 500;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.dyw-search-input::placeholder {
  color: rgba(148, 152, 162, 0.95);
}

.dyw-search-input::-webkit-search-cancel-button,
.dyw-search-input::-webkit-search-decoration {
  display: none;
}

.dyw-search-divider {
  width: 1px;
  height: clamp(18px, 1.6vw, 22px);
  margin: 0 clamp(8px, 1.0vw, 12px) 0 clamp(6px, 0.9vw, 10px);
  background: rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}

.dyw-search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 0.8vw, 8px);
  margin: 0;
  padding: 2px 4px 2px 2px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.94);
  flex-shrink: 0;
}

.dyw-search-submit:focus-visible {
  outline: 2px solid rgba(254, 44, 85, 0.55);
  outline-offset: 2px;
  border-radius: 8px;
}

.dyw-search-submit:hover {
  color: #fff;
}

.dyw-search-submit .dyw-search-svg {
  width: clamp(16px, 1.4vw, 20px);
  height: clamp(16px, 1.4vw, 20px);
  opacity: 1;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.94);
  display: block;
}

.dyw-search-submit-label {
  line-height: 1;
}

/* Web 顶栏缩放：避免搜索框与右侧按钮区重叠 */
@media (max-width: 1200px) {
  .dyw-search-wrap {
    left: 44%;
    transform: translateX(-62%);
    width: min(44%, calc(100% - 560px));
    min-width: 220px;
  }
}

@media (max-width: 1080px) {
  .dyw-search-wrap {
    left: 42%;
    transform: translateX(-68%);
    width: min(52%, calc(100% - 600px));
    min-width: 200px;
  }
}

/* 更窄时：搜索框收窄并整体左移，避免与右侧按钮重叠（不隐藏“搜索”文字） */
@media (max-width: 980px) {
  .dyw-search-wrap {
    left: 38%;
    transform: translateX(-78%);
    width: min(58%, calc(100% - 620px));
    min-width: 190px;
  }
}

/* 顶栏右侧：图标 + 头像 + 保存登录 + 下载横幅（纵向） */
.dyw-top-tray {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: var(--dyw-main-pad-right);
  max-width: min(300px, 36vw);
  position: relative;
  z-index: 4;
}

.dyw-top-actions-with-avatar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  /* 头像与图标列间距约为列间距的 1.5～2 倍 */
  gap: 12px;
}

.dyw-top-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  position: relative;
}

/* 仅占一列宽（与单独 .dyw-action 一致），保存登录绝对定位不撑开顶栏间距 */
.dyw-top-client-stack {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: fit-content;
  max-width: 56px;
  min-width: 48px;
  overflow: visible;
}

.dyw-save-login-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
  flex-wrap: nowrap;
}

.dyw-save-login-row--under-client {
  position: absolute;
  top: calc(100% + 20px);
  left: auto;
  /* 右缘与「私信」#webDmTrigger 右缘对齐：相对 actions 整体右缘内缩约 1 列（投稿 + gap） */
  right: calc(48px + 4px + 4px + 2px);
  transform: translateY(16px);
  margin-top: 0;
  width: max-content;
  max-width: 220px;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 6;
}

.dyw-save-login-row--under-client .dyw-login-help {
  width: 15px;
  height: 15px;
  border-width: 1px;
  font-size: 10px;
  font-weight: 700;
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.45);
}

.dyw-save-login-row--under-client .dyw-login-help:hover {
  border-color: rgba(255, 255, 255, 0.55);
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.06);
}

.dyw-save-login-row--under-client .dyw-save-login-label {
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
}

.dyw-save-login-row--under-client .dyw-login-toggle {
  opacity: 0.88;
}

.dyw-save-login-row--under-client .dyw-login-toggle-track {
  width: 38px;
  height: 20px;
}

.dyw-save-login-row--under-client .dyw-login-toggle-track::after {
  width: 16px;
  height: 16px;
  top: 2px;
  left: 2px;
}

.dyw-save-login-row--under-client .dyw-login-toggle-input:checked + .dyw-login-toggle-track::after {
  transform: translateX(18px);
}

.dyw-login-help {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  flex-shrink: 0;
}

.dyw-login-help:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.dyw-save-login-label {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.dyw-login-toggle {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 2px;
}

.dyw-login-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.dyw-login-toggle-track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  position: relative;
  transition: background 0.2s ease;
}

.dyw-login-toggle-track::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.dyw-login-toggle-input:checked + .dyw-login-toggle-track {
  background: #fe2c55;
}

.dyw-login-toggle-input:checked + .dyw-login-toggle-track::after {
  transform: translateX(20px);
}

.dyw-client-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px 10px 14px;
  border-radius: 10px;
  box-sizing: border-box;
  background: rgba(42, 44, 52, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dyw-client-banner-txt {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.dyw-client-banner-dl {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 15px;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
}

.dyw-client-banner-dl:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.dyw-client-dl-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
}

/* 贴资料区下沿，与 .dyw-profile-strip 底部分隔横线对齐（margin-top:auto 吃满 min-height 余量） */
.dyw-client-banner--hero-foot {
  flex: 0 0 auto;
  align-self: flex-start;
  width: min(100%, 292px, 28vw);
  padding: 9px 0 9px 14px;
  margin-top: auto;
  margin-right: 22px;
  margin-bottom: 0;
  box-sizing: border-box;
  gap: 0;
  align-items: stretch;
  border-radius: 16px;
  border: none;
  background: rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

.dyw-client-banner--hero-foot .dyw-client-banner-txt {
  align-self: center;
  padding-right: 10px;
  color: rgba(255, 255, 255, 0.98);
  font-weight: 500;
}

.dyw-client-banner--hero-foot .dyw-client-banner-divider {
  display: none;
}

.dyw-client-banner--hero-foot .dyw-client-banner-dl.dyw-client-banner-dl--plain {
  flex-shrink: 0;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  margin: -9px 0;
  padding: 0 12px 0 10px;
  border: none;
  border-radius: 0 15px 15px 0;
  background: rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
  gap: 6px;
}

.dyw-client-banner--hero-foot .dyw-client-banner-dl.dyw-client-banner-dl--plain:hover {
  background: rgba(255, 255, 255, 0.48);
  color: #fff;
  opacity: 1;
  filter: none;
}

.dyw-client-banner--hero-foot .dyw-client-dl-ico {
  color: #fff;
  opacity: 1;
}

.dyw-client-banner--hero-foot .dyw-client-banner-dl.dyw-client-banner-dl--plain:focus-visible {
  outline: 2px solid rgba(254, 44, 85, 0.55);
  outline-offset: 2px;
  border-radius: 0 12px 12px 0;
}

.dyw-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 48px;
  padding: 4px 4px;
  font-size: 11px;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* Web 私信：悬停手指，打开后恢复光标（原站交互感） */
body[data-role="web"] #webDmTrigger {
  cursor: pointer !important;
}

body[data-role="web"] #webDmTrigger *,
body[data-role="web"] #webDmTrigger *::before,
body[data-role="web"] #webDmTrigger *::after {
  cursor: pointer !important;
}

.dyw-top-actions .dyw-act-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.95);
  line-height: 0;
}

.dyw-top-actions .dyw-act-label {
  color: rgba(255, 255, 255, 0.52);
  font-weight: 600;
}

.dyw-top-actions .dyw-ico-svg.dyw-ico-act {
  width: 26px;
  height: 26px;
}

.dyw-top-actions .dyw-act-ico-dot {
  position: relative;
}

.dyw-top-actions .dyw-act-ico-count {
  position: relative;
}

.dyw-top-actions .dyw-act-num-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #fe2c55;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
}

.dyw-top-actions .dyw-act-ico-dot::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 5px;
  background: #fe2c55;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(22, 24, 35, 0.95);
}

.dyw-dm-trigger.is-active .dyw-act-ico,
.dyw-dm-trigger:hover .dyw-act-ico {
  color: #fff;
}

.dyw-dm-trigger.is-active .dyw-act-label,
.dyw-dm-trigger:hover .dyw-act-label {
  color: rgba(255, 255, 255, 0.6);
}

.dyw-top-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0;
  align-self: center;
  border: none;
  flex-shrink: 0;
}

.dyw-sync-pill {
  position: relative;
  z-index: 6;
  margin-top: 0;
  padding-right: var(--dyw-main-pad-right);
  text-align: right;
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
}

.dyw-sync-pill b {
  color: #5ee984;
  font-weight: 700;
}

/* 资料条底边；渐变由 .dyw-main-hero::before 统一铺到顶栏 */
.dyw-profile-strip {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 4px var(--dyw-main-pad-right) 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Web：去掉「作品」上方那条浅色分割线 */
body[data-role="web"] .dyw-profile-strip {
  border-bottom: none;
}

.dyw-profile {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  margin-bottom: 0;
  padding-bottom: 8px;
  border-bottom: none;
  position: relative;
  z-index: 1;
  font-family: "PingFang SC", "DFPKingGothicGB-Regular", -apple-system, BlinkMacSystemFont,
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

.dyw-profile-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  /* 与头像同高，便于横幅用 margin-top:auto 贴齐资料条底部分隔线 */
  min-height: 112px;
}

.dyw-profile-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: none;
  flex-shrink: 0;
}

.dyw-profile-info {
  flex: 1;
  min-width: 0;
}

.dyw-profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.dyw-profile-name {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.9);
}

.dyw-profile-nick-edit {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.6);
}

.dyw-profile-nick-edit:hover {
  color: rgba(255, 255, 255, 0.88);
}

.dyw-profile-nick-edit .dyw-ico-svg.dyw-ico-nav {
  width: 14px;
  height: 14px;
  filter: drop-shadow(-0.25px 0 0 rgba(0, 242, 234, 0.26)) drop-shadow(0.25px 0 0 rgba(255, 48, 96, 0.22));
}

.dyw-profile-nick-edit:hover .dyw-ico-svg.dyw-ico-nav {
  filter: drop-shadow(-0.35px 0 0 rgba(0, 242, 234, 0.34)) drop-shadow(0.35px 0 0 rgba(255, 48, 96, 0.3));
}

.dyw-profile-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
  margin-top: 8px;
  margin-bottom: 0;
}

.dyw-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: default;
}

.dyw-stat-label {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
}

.dyw-profile-stats em {
  font-style: normal;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  margin-right: 0;
}

.dyw-stat-vbar {
  width: 1px;
  height: 14px;
  margin: 0 20px;
  flex-shrink: 0;
  align-self: center;
  background: rgba(255, 255, 255, 0.22);
}

.dyw-profile-id {
  font-size: 13px;
  font-weight: 400;
  line-height: 22px;
  color: rgba(255, 255, 255, 0.58);
  margin-top: 10px;
  margin-bottom: 0;
}

.dyw-profile-bio {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 22px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  max-width: 560px;
}

.dyw-profile-aside {
  display: none;
}

.dyw-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.dyw-btn-download {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.dyw-tab-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 0;
}

.dyw-tabs-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.dyw-tabs {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 12px 26px;
  min-width: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* 与 .dyw-client-banner--hero-foot 共用右侧内缩，右缘与下载条对齐 */
.dyw-batch-manage {
  box-sizing: border-box;
  flex-shrink: 0;
  margin: 0;
  margin-left: auto;
  margin-right: 22px;
  padding: 5px 15px;
  height: auto;
  min-height: 26px;
  line-height: 1.25;
  border: none;
  border-radius: 999px;
  background-color: #3a3a44;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  text-align: center;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
  inline-size: max-content;
  white-space: nowrap;
}

.dyw-batch-manage:hover {
  background-color: #45454f;
  color: #fff;
}

.dyw-batch-manage:focus-visible {
  outline: 2px solid rgba(254, 44, 85, 0.55);
  outline-offset: 2px;
}

.dyw-tab {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
  padding-bottom: 10px;
  margin-bottom: -3px;
  border-bottom: 3px solid transparent;
}

.dyw-tab.is-active {
  color: #fff;
  font-weight: 600;
  border-bottom-color: #fe2c55;
}

.dyw-tab-num {
  margin-left: 6px;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  opacity: 1;
}

.dyw-tab-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin-left: 0;
  margin-right: 0;
  font-size: inherit;
  line-height: inherit;
  opacity: 0.76;
}

/* 与 Tab 同一行高内垂直居中（勿再用 translateY 破坏居中） */
body.dyw-body .dyw-tabs a.dyw-tab span.dyw-tab-lock > svg {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  display: block !important;
  flex-shrink: 0;
  align-self: center;
  box-sizing: content-box;
}

.dyw-subtabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  margin-top: 0;
  margin-bottom: 16px;
}

.dyw-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: none;
  color: rgba(255, 255, 255, 0.78);
  padding: 7px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 22px;
  cursor: pointer;
  font-family: inherit;
}

.dyw-pill.is-on {
  background: rgba(72, 66, 86, 0.88);
  color: #fe2c55;
  font-weight: 700;
}

/* 私密作品：无数量后收紧左右留白，与文案+锁标视觉配比 */
#webPrivatePill {
  padding-left: 12px;
  padding-right: 12px;
  gap: 5px;
}

.dyw-lock {
  display: inline-flex;
  align-items: center;
  align-self: center;
  margin-left: 0;
  margin-right: 0;
  font-size: inherit;
  line-height: inherit;
}

/* 私密作品等胶囊：与文案、数字同一行高垂直居中 */
body.dyw-body .dyw-subtabs button.dyw-pill span.dyw-lock > svg {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  display: block !important;
  flex-shrink: 0;
  align-self: center;
  box-sizing: content-box;
}

.dyw-subtabs-right {
  margin-left: auto;
  margin-right: 22px;
  display: flex;
  align-items: center;
}

.dyw-works-toolbar {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}

.dyw-works-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px 8px 10px;
  border: none;
  background: transparent;
  color: rgba(220, 222, 230, 0.88);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
}

.dyw-works-toolbar-btn:hover {
  color: rgba(255, 255, 255, 0.95);
}

.dyw-works-toolbar-btn:focus-visible {
  outline: 2px solid rgba(254, 44, 85, 0.5);
  outline-offset: 2px;
  border-radius: 4px;
}

.dyw-works-toolbar-ico {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: rgba(198, 200, 210, 0.92);
}

.dyw-works-toolbar-btn:hover .dyw-works-toolbar-ico {
  color: rgba(255, 255, 255, 0.88);
}

.dyw-works-toolbar-txt {
  white-space: nowrap;
}

.dyw-works-toolbar-caret {
  flex-shrink: 0;
  width: 8px;
  height: 5px;
  margin-left: 2px;
  opacity: 0.75;
}

.dyw-works-toolbar-sep {
  align-self: center;
  width: 1px;
  height: 16px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.2);
}

.dyw-link {
  cursor: default;
}

.dyw-link-btn {
  border: none;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.2);
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
  font-family: inherit;
}

.dyw-link-btn.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.dyw-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px 10px;
  /* 与 .dyw-batch-manage 右缘对齐 */
  margin-right: 22px;
}

.dyw-cell {
  min-width: 0;
}

.dyw-thumb {
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  background: #161823;
  position: relative;
  overflow: hidden;
}

.dyw-thumb::after {
  content: "";
}

.dyw-play {
  position: absolute;
  left: 7px;
  bottom: 7px;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.dyw-play-ico {
  width: 24px !important;
  height: 24px !important;
  flex-shrink: 0;
  display: block;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.65));
}

.dyw-cap {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.28;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.94);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.web-dm-open {
  overflow: hidden;
}

.web-dm-overlay {
  position: fixed;
  inset: 0;
  z-index: 200000;
  display: none;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0;
  pointer-events: none;
}

.web-dm-overlay.is-open {
  display: flex;
  pointer-events: auto;
}

.web-dm-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: auto;
}

/* 桌面端 hover 打开私信：遮罩不拦截顶栏交互，否则按钮处光标会变成普通箭头并导致 hover 闪烁 */
@media (hover: hover) and (pointer: fine) {
  /* 让顶栏按钮可被悬停命中：覆盖层不吃事件，仅面板吃事件 */
  .web-dm-overlay.is-open {
    pointer-events: none;
  }
  .web-dm-overlay.is-open .web-dm-backdrop {
    pointer-events: none;
  }
  .web-dm-overlay.is-open .web-dm-panel {
    pointer-events: auto;
  }
}

.web-dm-panel {
  position: fixed;
  z-index: 2;
  right: 30px;
  top: 56px;
  width: 581px;
  height: min(700px, calc(100vh - 76px));
  max-height: min(700px, calc(100vh - 76px));
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  animation: webDmIn 0.2s ease-out;
}

/* 仅首次点开私信（仅会话列表）：略窄；+1em ≈ 预览行一字宽，减轻末字被裁；展开进会话后不走此规则 */
.web-dm-overlay.is-open:not(.is-chat-open) .web-dm-panel {
  width: calc(322px + 1em);
  height: min(700px, calc(100vh - 76px));
  max-height: min(700px, calc(100vh - 76px));
}

/* 首次列表：条目左右略收紧，高亮条相对变窄（不影响展开双栏列表） */
.web-dm-overlay.is-open:not(.is-chat-open) .web-dm-list-full .dm-item {
  padding: 10px 10px 10px 8px;
}

.web-dm-overlay.is-open:not(.is-chat-open) .web-dm-list-full .dm-item.is-active::after {
  right: 10px;
}

/* 展开态：左侧会话列表 + 右侧聊天区 */
.web-dm-overlay.is-chat-open.is-expanded .web-dm-panel {
  width: min(702px, calc(100vw - 60px));
}

@keyframes webDmIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.web-dm-panel-inner {
  --web-dm-title-size: 16px;
  background: rgb(37, 38, 50);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  max-height: inherit;
  height: 100%;
  flex: 1 1 0;
}

.web-dm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 2px 48px 0 20px;
  box-sizing: border-box;
  color: rgba(255, 255, 255, 0.9);
}

.web-dm-head-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: var(--web-dm-title-size);
}

.web-dm-head-expand-cluster {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.web-dm-head-peer-name {
  display: inline-block;
  min-width: 0;
  max-width: min(340px, calc(100vw - 520px));
  font-size: 1em;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.web-dm-head-right {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.web-dm-title {
  font-size: 1em;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

/* 会话打开且未展开双栏时：隐藏“私信”标题，让展开按钮占据标题位置并居中对齐 */
#webDmOverlay.web-dm-overlay.is-chat-open:not(.is-expanded) .web-dm-title {
  display: none;
}

#webDmOverlay.web-dm-overlay.is-chat-open:not(.is-expanded) .web-dm-head-left {
  gap: 0;
}

#webDmOverlay.web-dm-overlay.is-chat-open:not(.is-expanded) .web-dm-head-left .web-dm-expand-btn {
  margin-left: 0;
}

/* 列表态：顶部显示“私信”+右侧展开按钮 */
.web-dm-overlay.is-open:not(.is-chat-open) .web-dm-head {
  justify-content: space-between;
  padding-right: 12px;
}

.web-dm-overlay.is-open:not(.is-chat-open) .web-dm-head-right {
  display: none;
}

.web-dm-overlay.is-open:not(.is-chat-open) .web-dm-head-right > :not(.web-dm-expand-btn) {
  display: none;
}

.web-dm-overlay.is-open:not(.is-chat-open) .web-dm-head-left .web-dm-head-ico {
  display: none;
}

.web-dm-head-link {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
}

.web-dm-head-link.is-follow {
  color: #fe2c55;
  font-weight: 600;
}

.web-dm-head-ico {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.72);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.web-dm-head-ico svg {
  width: 48px;
  height: 48px;
  display: block;
}

/* 与「私信」视觉字高对齐：同样字号下 SVG 图形通常偏小，用约 3×em 近似汉字外框 */
.web-dm-head-ico.web-dm-expand-btn {
  font-size: inherit;
  width: 3em;
  height: 3em;
}

.web-dm-head-ico.web-dm-expand-btn svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* 顶部展开/收起按钮：展开态箭头反向 */
.web-dm-overlay.is-chat-open.is-expanded .web-dm-expand-btn svg {
  transform: rotate(180deg);
}

/* 仅展开态：展开按钮 + 对方昵称整体移到左侧列表右缘（与图二一致） */
.web-dm-overlay.is-chat-open.is-expanded .web-dm-head {
  position: relative;
}

.web-dm-overlay.is-chat-open.is-expanded .web-dm-head-left .web-dm-head-expand-cluster {
  position: absolute;
  /* 与左侧列表列宽对齐：left = 列宽(258px) − 16px */
  left: 242px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  max-width: calc(100% - 258px);
}

/* 展开态：在左侧列表切换会话时，右侧聊天区轻微闪烁（避免低透明度“黑屏”感） */
@keyframes webDmThreadSwitchFlash {
  0% {
    opacity: 1;
    filter: brightness(1);
  }
  22% {
    opacity: 0.82;
    filter: brightness(1.06);
  }
  48% {
    opacity: 0.9;
    filter: brightness(0.97);
  }
  100% {
    opacity: 1;
    filter: brightness(1);
  }
}

.web-dm-overlay.web-dm-thread-switch-pulse .web-dm-chat-right {
  animation: webDmThreadSwitchFlash 0.36s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .web-dm-overlay.web-dm-thread-switch-pulse .web-dm-chat-right {
    animation: none;
  }
}

.web-dm-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.web-dm-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 12px 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.web-dm-dl {
  flex-shrink: 0;
  background: #fe2c55;
  color: #fff;
  border: none;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.web-dm-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.web-dm-list-full {
  min-height: 0;
  overflow-y: scroll;
  /* Web 私信列表容器：右侧内边距 12px（相对 16px 收窄），减轻右侧留白 */
  padding: 10px 12px 10px 8px;
  /* Firefox：thin；轨道宽度见下方 WebKit */
  scrollbar-width: thin;
  scrollbar-color: rgba(54, 55, 65, 0.95) transparent;
  scrollbar-gutter: stable;
}

.web-dm-side {
  display: none;
}

.web-dm-overlay.is-chat-open .web-dm-body {
  /* 未展开：头像竖栏 + 聊天区（图一） */
  grid-template-columns: 92px 1fr;
}

.web-dm-overlay.is-chat-open .web-dm-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.web-dm-overlay.is-chat-open.is-expanded .web-dm-body {
  /* 展开：向左增加完整列表 */
  grid-template-columns: 258px 1fr;
}

.web-dm-overlay.is-chat-open.is-expanded .web-dm-list-full {
  display: block;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.web-dm-overlay.is-chat-open.is-expanded .web-dm-side {
  display: none !important;
}

.web-dm-overlay.is-chat-open:not(.is-expanded) .web-dm-list-full {
  display: none;
}

.web-dm-side-toggle {
  display: none;
}

.web-dm-overlay.is-chat-open .web-dm-side-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--web-dm-title-size) * 1.6);
  height: calc(var(--web-dm-title-size) * 1.6);
  margin: 10px 0 6px 16px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.web-dm-overlay.is-chat-open .web-dm-side-toggle svg {
  width: 100%;
  height: 100%;
  display: block;
}

.web-dm-overlay.is-chat-open.is-expanded .web-dm-side-toggle svg {
  transform: rotate(180deg);
}

.web-dm-list {
  min-height: 0;
  overflow-y: scroll;
  padding: 8px 0;
  margin: 8px 0 16px 12px;
  border-right: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(54, 55, 65, 0.95) transparent;
  scrollbar-gutter: stable;
}

/* 默认：会话列表完整展示（头像 + 文案） */
.web-dm-list-full .dm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  /* 单行会话卡片：右侧内边距 14px（相对 20px 收窄），时间与灰底右缘更近 */
  padding: 10px 14px 10px 8px;
  border-radius: 12px;
  position: relative;
  transition: background-color .18s ease, box-shadow .18s ease;
  cursor: pointer;
}

/* 中间文案列占满剩余宽度并允许收缩，避免时间溢出父级「光标」区域 */
.web-dm-list-full .dm-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.web-dm-list--rail .dm-item {
  display: flex;
  justify-content: center;
  padding: 8px 0;
  border-bottom: none !important;
  border-radius: 12px;
  position: relative;
  transition: background-color .18s ease, box-shadow .18s ease;
  cursor: pointer;
}

.web-dm-list-full .dm-item:hover {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 6px 12px rgba(8, 10, 20, 0.24);
}

.web-dm-list--rail .dm-item:hover {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 5px 10px rgba(8, 10, 20, 0.22);
}

.web-dm-list-full .dm-item.is-active {
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 8px 16px rgba(8, 10, 20, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 选中会话底部阴影：right 与条目右侧 padding 对齐（14px） */
.web-dm-list-full .dm-item.is-active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 14px;
  bottom: -7px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(8, 10, 20, 0.42) 0%, rgba(8, 10, 20, 0) 72%);
  pointer-events: none;
}

.web-dm-list--rail .dm-item.is-active {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 12px rgba(8, 10, 20, 0.28);
}

.web-dm-list-full .dm-avatar,
.web-dm-list--rail .dm-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.web-dm-list-full .dm-avatar {
  width: 44px;
  height: 44px;
}

.web-dm-overlay.is-chat-open .web-dm-list--rail .dm-avatar {
  width: 52px;
  height: 52px;
}

/* 列表态（只显示完整列表）头像稍小 */
.web-dm-overlay.is-open:not(.is-chat-open) .web-dm-list-full .dm-avatar {
  width: 44px;
  height: 44px;
}

/* 左侧头像栏滚动条（轨道/滑块） */
.web-dm-list::-webkit-scrollbar {
  width: 2px;
}

.web-dm-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  margin: 8px 0;
}

.web-dm-list::-webkit-scrollbar-thumb {
  background: rgba(54, 55, 65, 0.9);
  border-radius: 999px;
}

.web-dm-list::-webkit-scrollbar-thumb:hover {
  background: rgba(54, 55, 65, 0.96);
}

.web-dm-chat-wrap {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
}

.web-dm-chat-wrap[hidden] { display: none !important; }

.web-dm-chat-left {
  display: none;
}

.web-dm-chat-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.web-dm-chat-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.web-dm-back {
  margin-top: auto;
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(59, 130, 246, 0.28);
  color: #dbeafe;
  font-weight: 700;
  cursor: pointer;
}

.web-dm-chat-right {
  background: transparent;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.web-dm-thread-list {
  flex: 1;
  min-height: 0;
  overflow-y: scroll;
  padding: 12px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(54, 55, 65, 0.95) transparent;
  scrollbar-gutter: stable;
}

/* Web 端私信：首次会话顶部说明（仅对方未回复时出现一条；时间在提示上方） */
.web-dm-first-send-hint {
  text-align: center;
  color: #8b919d;
  font-size: 13px;
  line-height: 1.55;
  padding: 2px 16px 12px;
  max-width: min(520px, calc(100% - 8px));
  margin: 0 auto;
  flex-shrink: 0;
}

.web-dm-thread-list > .thread-time-center + .web-dm-first-send-hint {
  padding-top: 0;
  margin-top: -2px;
}

/* Web端私信：时间居中显示（不在气泡内显示） */
.thread-time-center,
.web-dm-time-center {
  text-align: center;
  color: #9aa3af;
  font-size: 12px;
  line-height: 18px;
  padding: 6px 0 10px;
}


/* 私信滚动条（轨道/滑块）统一样式：列表/头像栏/消息区 */
.web-dm-thread-list::-webkit-scrollbar,
.web-dm-list::-webkit-scrollbar {
  width: 2px;
}

/* 会话列表：与消息区同宽细滚轨（Chromium / Safari） */
.web-dm-list-full::-webkit-scrollbar {
  width: 2px;
}

.web-dm-list-full::-webkit-scrollbar-track,
.web-dm-thread-list::-webkit-scrollbar-track,
.web-dm-list::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
  margin: 8px 0;
  box-shadow: none;
}

.web-dm-list-full::-webkit-scrollbar-thumb,
.web-dm-thread-list::-webkit-scrollbar-thumb,
.web-dm-list::-webkit-scrollbar-thumb {
  background: rgba(54, 55, 65, 0.9);
  border-radius: 999px;
  min-height: 24px;
  box-shadow: none;
}

.web-dm-list-full::-webkit-scrollbar-thumb:hover,
.web-dm-thread-list::-webkit-scrollbar-thumb:hover,
.web-dm-list::-webkit-scrollbar-thumb:hover {
  background: rgba(54, 55, 65, 0.96);
}

.web-dm-list-full::-webkit-scrollbar-button:single-button,
.web-dm-thread-list::-webkit-scrollbar-button:single-button,
.web-dm-list::-webkit-scrollbar-button:single-button {
  display: block;
  height: 9px;
  background: transparent;
}

.web-dm-list-full::-webkit-scrollbar-button:single-button:vertical:decrement,
.web-dm-thread-list::-webkit-scrollbar-button:single-button:vertical:decrement,
.web-dm-list::-webkit-scrollbar-button:single-button:vertical:decrement {
  background:
    linear-gradient(135deg, transparent 50%, rgba(54, 55, 65, 0.95) 50%) 50% 55%/6px 6px no-repeat,
    linear-gradient(225deg, transparent 50%, rgba(54, 55, 65, 0.95) 50%) 50% 55%/6px 6px no-repeat;
}

.web-dm-list-full::-webkit-scrollbar-button:single-button:vertical:increment,
.web-dm-thread-list::-webkit-scrollbar-button:single-button:vertical:increment,
.web-dm-list::-webkit-scrollbar-button:single-button:vertical:increment {
  background:
    linear-gradient(315deg, transparent 50%, rgba(54, 55, 65, 0.95) 50%) 50% 45%/6px 6px no-repeat,
    linear-gradient(45deg, transparent 50%, rgba(54, 55, 65, 0.95) 50%) 50% 45%/6px 6px no-repeat;
}

/* 另外两个消息列表页：滚动条同 web 私信 */
.dy-msg-list,
.app-msg-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(54, 55, 65, 0.95) rgba(255, 255, 255, 0.04);
  scrollbar-gutter: stable;
}

.dy-msg-list::-webkit-scrollbar,
.app-msg-list::-webkit-scrollbar {
  width: 2px;
}

.dy-msg-list::-webkit-scrollbar-track,
.app-msg-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  margin: 10px 0;
  box-shadow: none;
}

.dy-msg-list::-webkit-scrollbar-thumb,
.app-msg-list::-webkit-scrollbar-thumb {
  background: rgba(54, 55, 65, 0.9);
  border-radius: 999px;
  min-height: 44px;
  box-shadow: none;
}

.dy-msg-list::-webkit-scrollbar-button:single-button,
.app-msg-list::-webkit-scrollbar-button:single-button {
  display: block;
  height: 9px;
  background: transparent;
}

.dy-msg-list::-webkit-scrollbar-button:single-button:vertical:decrement,
.app-msg-list::-webkit-scrollbar-button:single-button:vertical:decrement {
  background:
    linear-gradient(135deg, transparent 50%, rgba(54, 55, 65, 0.95) 50%) 50% 55%/6px 6px no-repeat,
    linear-gradient(225deg, transparent 50%, rgba(54, 55, 65, 0.95) 50%) 50% 55%/6px 6px no-repeat;
}

.dy-msg-list::-webkit-scrollbar-button:single-button:vertical:increment,
.app-msg-list::-webkit-scrollbar-button:single-button:vertical:increment {
  background:
    linear-gradient(315deg, transparent 50%, rgba(54, 55, 65, 0.95) 50%) 50% 45%/6px 6px no-repeat,
    linear-gradient(45deg, transparent 50%, rgba(54, 55, 65, 0.95) 50%) 50% 45%/6px 6px no-repeat;
}

.dy-msg-list::-webkit-scrollbar-thumb:hover,
.app-msg-list::-webkit-scrollbar-thumb:hover {
  background: rgba(54, 55, 65, 0.96);
}

/* App消息列表：隐藏滚动条，但保留滚动能力（鼠标滚轮/触摸） */
body[data-role="app"] .app-msg-list::-webkit-scrollbar,
body[data-role="app"] .app-msg-list::-webkit-scrollbar-thumb,
body[data-role="app"] .app-msg-list::-webkit-scrollbar-track,
body[data-role="app"] .app-msg-list::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.thread-msg {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: flex-end;
}

/* 私信：同一时间条内连续同侧消息，从第二条起隐藏侧栏头像（保留占位不挤压气泡） */
.thread-msg.thread-msg--avatar-hidden .thread-avatar {
  visibility: hidden;
  pointer-events: none;
}

.thread-msg.mine {
  flex-direction: row-reverse;
}

.thread-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.thread-bubble {
  max-width: 75%;
  background: rgb(54, 55, 65);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 10px 12px;
}

.thread-msg.mine .thread-bubble {
  background: rgb(54, 55, 65);
  color: rgba(255, 255, 255, 0.92);
}

/* Web端私信：自己发出的气泡为蓝色 */
.web-dm-overlay .thread-msg.mine .thread-bubble {
  background: #4c7dff;
  color: #fff;
}

.thread-text {
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
  white-space: pre-wrap;
}

.thread-time {
  margin-top: 8px;
  font-size: 12px;
  line-height: 18px;
  color: rgba(255, 255, 255, 0.46);
}

.web-dm-chat-right .thread-time {
  text-align: right;
}

.thread-text {
  font-size: 13px;
  line-height: 1.45;
}

.thread-time {
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.66;
}

.web-dm-list-full .dm-item {
  cursor: pointer;
  border-bottom: none !important;
}

.web-dm-list-full .dm-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.web-dm-list-full .dm-name {
  color: #fff;
  font-weight: 700;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.web-dm-list-full .dm-text {
  color: rgba(255, 255, 255, 0.56);
  font-weight: 500;
}

.web-dm-list-full .dm-time {
  color: rgba(255, 255, 255, 0.42);
  font-weight: 500;
}

/* Web 私信列表：第二行预览 + · + 时间；gap 略大避免预览与时间挤在一起 */
.web-dm-list-full .dm-meta-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
}

/* 预览区：按内容宽度排列（不占满整行），⋯ 与时间紧跟其后，避免中间被 flex 撑出大空隙 */
.web-dm-list-full .dm-meta-row .dm-text {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
}

/* 裁切只在 __clip/__t 内；⋯ 单独 flex 项且 flex-shrink:0，避免消失；与正文纵轴对齐 */
.web-dm-list-full .dm-meta-row .dm-text .web-dm-list-preview-line {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.web-dm-list-full .dm-meta-row .dm-text .web-dm-list-preview-line__clip {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.web-dm-list-full .dm-meta-row .dm-text .web-dm-list-preview-line__t {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
}

.web-dm-list-full .dm-meta-row .dm-text .web-dm-list-preview-line__dots {
  flex-shrink: 0;
  align-self: center;
  line-height: 1;
  transform: translateY(-0.04em);
}

/* 短预览仅有文本节点（无 span）：不要 flex 撑满整行，否则与时间中间也会空一截 */
.web-dm-list-full .dm-meta-row .dm-text:not(:has(.web-dm-list-preview-line)) {
  display: block;
  flex: 0 1 auto;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 悬停 / 选中 / 键盘焦点：预览、时间与会话昵称同色（#fff） */
.web-dm-list-full .dm-item:hover .dm-meta-row .dm-text,
.web-dm-list-full .dm-item.is-active .dm-meta-row .dm-text,
.web-dm-list-full .dm-item:focus-within .dm-meta-row .dm-text {
  color: #fff;
}

.web-dm-list-full .dm-item:hover .dm-meta-row .dm-time,
.web-dm-list-full .dm-item.is-active .dm-meta-row .dm-time,
.web-dm-list-full .dm-item:focus-within .dm-meta-row .dm-time {
  color: #fff;
}

.web-dm-list-full .dm-item:hover .dm-meta-row .dm-text .web-dm-list-preview-line,
.web-dm-list-full .dm-item.is-active .dm-meta-row .dm-text .web-dm-list-preview-line,
.web-dm-list-full .dm-item:focus-within .dm-meta-row .dm-text .web-dm-list-preview-line {
  color: #fff;
}

.web-dm-list-full .dm-item:hover .dm-meta-row .dm-time::before,
.web-dm-list-full .dm-item.is-active .dm-meta-row .dm-time::before,
.web-dm-list-full .dm-item:focus-within .dm-meta-row .dm-time::before {
  color: #fff;
}

.web-dm-list-full .dm-meta-row .dm-time {
  flex-shrink: 0;
  white-space: nowrap;
}

.web-dm-list-full .dm-meta-row .dm-time::before {
  content: "·";
  display: inline-block;
  margin: 0 5px 0 0;
  color: rgba(255, 255, 255, 0.38);
}

.web-dm-compose {
  display: flex;
  height: 78px;
  padding: 16px;
  box-sizing: border-box;
  border-top: none;
  background: rgb(37, 38, 50);
}

.web-dm-compose-bar {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px 0 18px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  box-sizing: border-box;
}

.web-dm-compose input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  padding: 0;
  font-size: 14px;
  font-weight: 400;
  font-family: inherit;
  outline: none;
}

.web-dm-compose input::placeholder {
  color: rgba(255, 255, 255, 0.38);
  font-weight: 400;
}

.web-dm-compose-tools {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.web-dm-tool {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.72);
}

.web-dm-tool svg {
  width: 44px;
  height: 44px;
  display: block;
}

.web-dm-tool:hover {
  color: rgba(255, 255, 255, 0.9);
}

.web-dm-send {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.web-dm-send--icon {
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
}

.web-dm-send--icon svg {
  width: 44px;
  height: 44px;
  display: block;
}

.web-dm-send--icon:hover {
  color: rgba(255, 255, 255, 0.98);
}

/* 输入条右侧：三枚图标同尺寸、无外框/描边 */
.web-dm-compose-tools .web-dm-tool,
.web-dm-compose-tools .web-dm-send--icon {
  width: 44px;
  height: 44px;
  border: none;
  outline: none;
  box-shadow: none;
}

.web-dm-compose-tools .web-dm-tool:focus,
.web-dm-compose-tools .web-dm-tool:focus-visible,
.web-dm-compose-tools .web-dm-send--icon:focus,
.web-dm-compose-tools .web-dm-send--icon:focus-visible {
  outline: none;
}

@media (max-width: 1200px) {
  .dyw-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .dyw-app {
    flex-direction: column;
    gap: 12px;
  }

  .dyw-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
  }

  .dyw-side-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1;
    padding-top: 0;
  }

  .dyw-side-bottom {
    flex-direction: row;
    border-top: none;
    padding-top: 0;
  }

  .dyw-search-wrap {
    position: static;
    left: auto;
    transform: none;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: none;
    pointer-events: auto;
  }

  .dyw-top-tray {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    align-items: stretch;
    order: 3;
  }

  .dyw-top-actions-with-avatar {
    justify-content: space-between;
  }

  .dyw-top-inner {
    padding-bottom: 16px;
  }

  .dyw-top-client-stack {
    max-width: none;
    width: auto;
  }

  .dyw-save-login-row--under-client {
    position: static;
    transform: none;
    left: auto;
    margin-top: 12px;
    width: auto;
    max-width: none;
  }

  .dyw-save-login-row {
    justify-content: flex-start;
  }

  .dyw-profile-body {
    flex-direction: column;
    align-items: stretch;
  }

  .dyw-client-banner--hero-foot {
    max-width: none;
    width: 100%;
    align-self: stretch;
    margin-top: 12px;
    margin-right: 0;
  }

  .dyw-batch-manage {
    margin-right: 0;
  }

  .dyw-subtabs-right {
    margin-right: 0;
    margin-left: 0;
    width: 100%;
    justify-content: stretch;
  }

  .dyw-grid {
    margin-right: 0;
  }

  .dyw-works-toolbar {
    width: 100%;
    max-width: 100%;
  }

  .dyw-works-toolbar-btn:first-of-type {
    flex: 1 1 auto;
    min-width: 0;
  }

  .dyw-works-toolbar-txt {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dyw-top-actions {
    margin-left: 0;
  }

  .dyw-top-inner {
    flex-wrap: wrap;
  }

  .dyw-profile {
    flex-direction: column;
    align-items: flex-start;
  }

  .dyw-profile-aside {
    align-items: flex-start;
  }

  .dyw-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .web-dm-overlay.is-open {
    padding: 56px 12px 12px;
    justify-content: center;
  }

  .web-dm-panel {
    width: min(322px, 100%);
    height: min(700px, calc(100vh - 76px));
    max-height: min(700px, calc(100vh - 76px));
  }
}

.admin-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 跨整行的表单项：允许在 grid 内正确收缩，避免说明文字被挤成竖条 */
.admin-grid > .field.admin-field--full {
  grid-column: 1 / -1;
  min-width: 0;
}

/* 勾选 + 长说明：用 grid 固定「左 checkbox / 右文案」，避免 flex 在嵌套 grid 里把文案宽度算成 0 导致一字一行 */
.admin-inline-checkbox-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  justify-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-inline-checkbox-row input[type="checkbox"] {
  margin-top: 3px;
}

.admin-inline-checkbox-row__hint {
  margin: 0;
  text-align: left;
  line-height: 1.55;
  overflow-wrap: break-word;
  word-break: normal;
  min-width: 0;
}

.admin-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 8px;
  background: linear-gradient(180deg, #0f1630 0%, #121f43 100%);
  border-radius: 14px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: calc(100vh - 20px);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #5b5cf7;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.admin-brand-title {
  color: #fff;
  font-weight: 800;
  font-size: 19px;
}

.admin-brand-sub {
  color: rgba(203, 213, 225, 0.75);
  font-size: 12px;
}

.admin-badge {
  width: fit-content;
  background: #0f9a55;
  color: #fff;
  border-radius: 9px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
}

.admin-back-btn {
  display: block;
  color: #dbeafe;
  text-decoration: none;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.45);
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
}

.admin-menu-title {
  color: rgba(203, 213, 225, 0.95);
  font-size: 15px;
  font-weight: 800;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-menu-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-menu-item {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  border-radius: 10px;
  padding: 11px 12px;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
}

.admin-menu-item.active {
  background: #6b57ff;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(107, 87, 255, 0.35);
}

.admin-menu-item.is-muted {
  color: rgba(203, 213, 225, 0.85);
  opacity: 0.92;
  cursor: default;
}

.admin-panel[hidden] {
  display: none !important;
}

.admin-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== PC clone UI ===== */
.pcx-shell {
  background: #f7f3ea;
}

.pcx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
  padding: 3px 4px 3px 10px;
  font-size: 12px;
  line-height: 1.25;
  color: #111;
  background: #fffdf7;
  border-bottom: 1px solid #eadfcb;
  flex-shrink: 0;
}

.pcx-head-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
  padding-right: 6px;
  border-radius: 4px 0 0 0;
}

.pcx-head-icon-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

.pcx-head-icon-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.pcx-head-icon-btn:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 1px;
}

.pcx-head-brand-img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* 必须压过上面的 display:block / inline-flex，否则 [hidden] 无效，会与自定义图叠出两个图标 */
.pcx-head-brand-img[hidden] {
  display: none !important;
}

.pcx-head-brand-ico {
  flex-shrink: 0;
  display: inline-flex;
  line-height: 0;
}

.pcx-head-brand-ico[hidden] {
  display: none !important;
}

.pcx-head-icon-btn.is-custom-ico .pcx-head-brand-ico {
  display: none !important;
}

.pcx-head-status {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #111;
  line-height: 1.25;
}

.pcx-head-status:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 1px;
  border-radius: 3px;
}

.pcx-head-win {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
  padding: 0 2px 0 0;
  background: transparent;
}

.pcx-win-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #111;
  cursor: pointer;
  line-height: 0;
}

.pcx-win-btn:hover {
  background: rgba(0, 0, 0, 0.07);
}

.pcx-win-btn--close:hover {
  background: #e81123;
  color: #fff;
}

.pcx-shell.pcx-shell--min {
  width: 320px !important;
  height: 28px !important;
}

.pcx-shell.pcx-shell--min .pcx-body {
  display: none !important;
}

.pcx-shell.pcx-shell--min .pcx-head {
  border-bottom: 0;
}

/* Electron 壳内 window.prompt 通常不可用：顶栏编辑等改用自定义输入层 */
body[data-role="pc"] .pcx-inline-prompt-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  background: rgba(15, 23, 42, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

body[data-role="pc"] .pcx-inline-prompt-card {
  width: min(520px, 100%);
  background: #fffdf7;
  border: 1px solid #eadfcb;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  padding: 16px 18px;
  box-sizing: border-box;
}

body[data-role="pc"] .pcx-inline-prompt-title {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  margin-bottom: 10px;
}

body[data-role="pc"] .pcx-inline-prompt-input {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 72px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid #e4d8c6;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-family: inherit;
}

body[data-role="pc"] .pcx-inline-prompt-input:focus {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 1px;
}

body[data-role="pc"] .pcx-inline-prompt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

/* PC 端：设计稿约 1140×612，视口内等比缩放；宽屏允许略大于 1 倍显示（整体更大） */
body[data-role="pc"] {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  background: #dad2c8;
}

/* PC 全屏：铺满屏幕覆盖显示（不再居中缩放外框） */
body[data-role="pc"].pcx-fullscreen {
  padding: 0;
  background: #f7f3ea;
}

body[data-role="pc"].pcx-fullscreen .pcx-shell {
  width: 100vw !important;
  height: 100vh !important;
  transform: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body[data-role="pc"] .pcx-shell {
  --pc-design-w: 1140;
  --pc-design-h: 612;
  width: calc(var(--pc-design-w) * 1px);
  height: calc(var(--pc-design-h) * 1px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  transform-origin: center center;
  transform: scale(
    min(
      1.9,
      calc((100vw - 24px) / var(--pc-design-w)),
      calc((100vh - 24px) / var(--pc-design-h))
    )
  );
  border-radius: 10px;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.12);
}

.pcx-body {
  display: grid;
  /* 侧栏 / 设置区 / 记录区 ≈ 10% / 36% / 54%（主区 90% 内 4:6 分，便于关注设置标题单行） */
  grid-template-columns: 10% 90%;
  min-height: 0;
  flex: 1;
}

.pcx-side {
  background: #f3ebde;
  border-right: 1px solid #e4d8c6;
  padding: 10px 0;
}

.pcx-side-item {
  width: 100%;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: #71522f;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 12px 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}

/* 侧栏：账号 / 私信同一 DOM 结构，共用固定图标槽，两行图标左缘与文案起笔对齐 */
.pcx-side-item .pcx-side-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  flex-shrink: 0;
  line-height: 0;
  font-size: 18px;
}

.pcx-side-item .pcx-side-ico svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pcx-side-item .pcx-side-txt {
  min-width: 0;
  white-space: nowrap;
  line-height: 1.2;
}

/* 私信：未选中灰；选中橙；文案加粗 */
.pcx-side-item--dm .pcx-side-ico,
.pcx-side-item--dm .pcx-side-txt {
  color: #8a8580;
}

.pcx-side-item--dm.is-active .pcx-side-ico,
.pcx-side-item--dm.is-active .pcx-side-txt {
  color: #de7a11;
}

.pcx-side-item--dm .pcx-side-txt {
  font-weight: 700;
  writing-mode: horizontal-tb;
}

.pcx-side-item.is-active {
  background: #f7e7cc;
  border-left-color: #ef8f26;
  color: #de7a11;
}

.pcx-main {
  padding: 8px 8px 10px;
  min-width: 0;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pcx-page {
  display: none;
}

.pcx-page.is-active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.pcx-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.pcx-btn {
  border: 0;
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  height: 30px;
  padding: 0 12px;
  cursor: pointer;
}

.pcx-btn.green { background: #17a34a; }
.pcx-btn.red { background: #e53935; }
.pcx-btn.blue { background: #2c7be5; }
.pcx-btn.orange { background: #f09a24; }
.pcx-btn.purple { background: #8c5ad4; }
.pcx-btn.gray { background: #8a8f99; }
.pcx-btn.wide { width: 100%; margin-top: 8px; }

.pcx-panel {
  background: #f7f3e8;
  border: 1px solid #eadfca;
  border-radius: 6px;
  padding: 10px;
}

.pcx-account-table-wrap {
  background: #fff;
  padding: 0;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

/* 账号表「状态」列：表头与徽章列居中一致 */
body[data-role="pc"] .pcx-account-table-wrap .pcx-table thead th:nth-child(10),
body[data-role="pc"] .pcx-account-table-wrap .pcx-table tbody td:nth-child(10) {
  text-align: center;
}

/* 添加账号弹窗内「状态」列同上 */
#pcAccountPicker .pcx-table thead th:nth-child(5),
#pcAccountPicker .pcx-table tbody td:nth-child(5) {
  text-align: center;
}

.pcx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}

.pcx-table th,
.pcx-table td {
  border-bottom: 1px solid #f0ede6;
  padding: 8px 8px;
  text-align: left;
  white-space: nowrap;
}

/* PC 发送记录：确保时间/IP 列可见 */
body[data-role="pc"] #recordTableBody td:nth-child(4),
body[data-role="pc"] .pcx-table thead th:nth-child(4) {
  min-width: 120px;
}
body[data-role="pc"] #recordTableBody td:nth-child(5),
body[data-role="pc"] .pcx-table thead th:nth-child(5) {
  min-width: 120px;
}

.pcx-table th {
  background: #f6f0e2;
  color: #6b5a43;
  font-weight: 700;
}

.pcx-table td.pcx-ck-cell {
  cursor: pointer;
  user-select: none;
  text-align: left;
  padding-left: 12px;
}

.pcx-table td.pcx-ck-cell:hover {
  color: #de7a11;
  text-decoration: underline;
}

/* 账号表 UID 列：表头与单元格（含 class / 序号）统一居中 */
body[data-role="pc"] .pcx-account-table-wrap .pcx-table thead th:nth-child(7),
body[data-role="pc"] .pcx-account-table-wrap .pcx-table tbody td:nth-child(7) {
  text-align: center;
}

.pcx-table td.pcx-uid-cell {
  cursor: pointer;
  user-select: none;
  text-align: center;
}

.pcx-table td.pcx-uid-cell:hover {
  color: #de7a11;
  text-decoration: underline;
}

.pcx-status-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}

.pcx-status-toggle {
  border: none;
  cursor: pointer;
  font-family: inherit;
  width: 170px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcx-status-pending {
  background: #ffe9cc;
  color: #d97706;
}

.pcx-status-ok {
  background: #dcfce7;
  color: #15803d;
}

.pcx-status-bad {
  background: #fee2e2;
  color: #b91c1c;
}

.pcx-modal[hidden] {
  display: none !important;
}

.pcx-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pcx-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.45);
}

.pcx-modal-card {
  position: relative;
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 30px);
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pcx-modal-head {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  font-size: 15px;
}

.pcx-modal-body {
  padding: 10px;
  overflow: auto;
}

.pcx-modal-foot {
  padding: 10px 12px;
  border-top: 1px solid #eef2f7;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.pcx-empty-row {
  text-align: center !important;
  color: #a79d8f;
  padding: 30px 8px !important;
}

.pcx-dm-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: 12px;
  flex: 1;
  min-height: 0;
  align-content: stretch;
}

.pcx-dm-left-scroll {
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.pcx-dm-left-scroll .pcx-panel {
  margin-bottom: 10px;
}

/* PC 私信页：关注设置（标题+说明+单选） */
.pcx-follow-settings-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.pcx-follow-settings-ico {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.pcx-follow-settings-intro {
  margin: 0;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: #2d2a26;
  white-space: nowrap;
}

.pcx-follow-settings-intro strong {
  font-weight: 700;
  font-size: 13px;
  color: #1a1714;
}

.pcx-follow-settings-warn {
  font-weight: 400;
  font-size: 12.5px;
  color: #5a5248;
}

.pcx-follow-settings-radios {
  margin-top: 6px;
}

.pcx-follow-settings .pcx-radio-follow {
  display: flex;
  align-items: center;
  margin: 8px 0 0;
  font-size: 13px;
  color: #3d362c;
}

.pcx-follow-settings .pcx-radio-follow:first-of-type {
  margin-top: 4px;
}

.pcx-follow-settings .pcx-radio-follow input {
  width: 16px;
  height: 16px;
  margin: 0 8px 0 0;
  flex-shrink: 0;
  accent-color: #ef8f26;
}

/* PC 私信页：代理设置（标题+开关+购买+必填代理IP） */
.pcx-proxy-settings {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.pcx-proxy-settings-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  width: 100%;
}

.pcx-proxy-settings-ico {
  display: flex;
  line-height: 0;
  flex-shrink: 0;
}

.pcx-proxy-settings-title {
  font-size: 13px;
  font-weight: 700;
  color: #4a4338;
}

.pcx-proxy-switch {
  margin: 4px 0 8px;
  width: 100%;
}

.pcx-btn.pcx-proxy-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  align-self: flex-start;
  width: auto;
  height: 28px;
  min-height: 0;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 5px;
}

.pcx-proxy-buy-ico {
  flex-shrink: 0;
}

.pcx-proxy-ip-block {
  align-self: stretch;
  width: 100%;
  margin-top: 12px;
}

.pcx-proxy-ip-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4a4338;
  margin-bottom: 6px;
}

.pcx-req-star {
  margin-left: 2px;
  color: #e53935;
  font-weight: 700;
}

.pcx-proxy-ip-input:disabled {
  background: #f3f1ec;
  color: #9a9185;
  cursor: not-allowed;
  border-color: #e4dcd0;
}

/* 附加内容-卡片：关「允许修改」时为暖灰底，非白 */
.pcx-input.pcx-card-meta-input:disabled {
  background: #ebe8e3;
  color: #4d453c;
  cursor: not-allowed;
  border-color: #ddd8cf;
}

.pcx-input.pcx-card-meta-input:disabled::placeholder {
  color: #9a9285;
}

.pcx-proxy-ip-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #8a8275;
  line-height: 1.4;
}

/* PC 私信页：任务配置（定时开关 + 时间/上限 + 启动 + 说明） */
.pcx-task-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.pcx-task-head-ico {
  display: flex;
  line-height: 0;
  flex-shrink: 0;
}

.pcx-task-head-title {
  font-size: 13px;
  font-weight: 700;
  color: #4a4338;
}

.pcx-task-switch {
  margin: 2px 0 0;
}

.pcx-task-body {
  margin-top: 10px;
}

.pcx-task-field {
  margin-top: 12px;
}

.pcx-task-field:first-of-type {
  margin-top: 4px;
}

.pcx-task-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4a4338;
  margin-bottom: 6px;
}

.pcx-task-time-wrap {
  position: relative;
}

.pcx-task-time-wrap .pcx-task-input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 40px;
}

.pcx-task-time-ico {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  line-height: 0;
  pointer-events: none;
  opacity: 0.85;
}

.pcx-task-limit-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pcx-task-limit-input {
  flex: 1;
  min-width: 0;
}

.pcx-task-suffix {
  flex-shrink: 0;
  font-size: 13px;
  color: #8a8275;
  font-weight: 600;
}

.pcx-task-start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pcx-btn.wide.pcx-task-start-btn {
  margin-top: 14px;
}

.pcx-task-foot-notes {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pcx-task-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.pcx-task-note-ico {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  line-height: 0;
  color: #9a9285;
}

.pcx-task-note-txt {
  font-size: 12px;
  line-height: 1.5;
  color: #8a8275;
}

.pcx-task-sent-num {
  color: #2563eb;
  font-weight: 700;
}

.pcx-box-title {
  font-size: 13px;
  font-weight: 700;
  color: #655641;
  margin-bottom: 6px;
}

.pcx-textarea,
.pcx-input {
  width: 100%;
  border: 1px solid #e1d5bf;
  background: #fff;
  border-radius: 4px;
  padding: 8px 9px;
  font-size: 13px;
  font-family: inherit;
}

.pcx-textarea {
  min-height: 84px;
  resize: vertical;
}

.pcx-inline-btns {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.pcx-radio {
  display: block;
  font-size: 13px;
  margin: 7px 0;
  color: #584e3f;
}

.pcx-radio input {
  margin-right: 6px;
}

.pcx-append-block {
  margin-top: 8px;
}

.pcx-append-block[hidden] {
  display: none !important;
}

.pcx-field-label {
  font-size: 14px;
  color: #8c7b64;
  margin-bottom: 6px;
}

.pcx-msg-textarea {
  min-height: 86px;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid #e6dcc8;
  color: #4d3f2d;
}

.pcx-msg-textarea::placeholder {
  color: #c8c2db;
}

.pcx-card-preview {
  margin: 8px 0 10px;
  border: 1px solid #eadfca;
  border-radius: 10px;
  background: #fdfbf6;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pcx-card-logo {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #1cb758;
}

.pcx-card-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.pcx-card-preview-img.is-visible {
  display: block;
}

.pcx-card-preview-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 34px;
  font-weight: 800;
  pointer-events: none;
}

.pcx-card-preview-fallback.is-hidden {
  display: none;
}

.pcx-card-lines {
  font-size: 14px;
  color: #5f4e38;
  line-height: 1.35;
  font-weight: 600;
}

.pcx-switch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  color: #6a5d4a;
  font-size: 14px;
  font-weight: 600;
}

.pcx-switch-row input[type="checkbox"] {
  width: 38px;
  height: 22px;
  appearance: none;
  border-radius: 999px;
  background: #e8e2d5;
  position: relative;
  cursor: pointer;
  border: 1px solid #d8cfbd;
}

.pcx-switch-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.pcx-switch-row input[type="checkbox"]:checked {
  background: #f09a24;
}

.pcx-switch-row input[type="checkbox"]:checked::after {
  transform: translateX(16px);
}

.pcx-interval-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #6b5a43;
  margin-bottom: 10px;
}

.pcx-interval-input {
  width: 54px;
  height: 38px;
  border: 1px solid #d8c8ad;
  border-radius: 6px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.pcx-progress-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  color: #7b6c54;
  font-size: 14px;
  margin-bottom: 10px;
}

.pcx-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #e8dfcf;
  overflow: hidden;
}

.pcx-progress-bar i {
  display: block;
  height: 100%;
  background: #f09a24;
}

.pcx-send-main {
  font-size: 18px;
  letter-spacing: 0.02em;
}

body[data-role="pc"] .pcx-btn.wide.pcx-send-main {
  height: auto;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
}

body[data-role="pc"] .pcx-btn.wide.pcx-send-main .pcx-send-main-txt {
  color: #fff;
  font-weight: 700;
}

/* 暂停：纯 CSS 双杠，避免 SVG/emoji 在部分环境出现蓝底 */
body[data-role="pc"] .pcx-btn.wide.pcx-send-main .pcx-send-pause-ico {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  position: relative;
  box-sizing: border-box;
  background: transparent;
}

body[data-role="pc"] .pcx-btn.wide.pcx-send-main .pcx-send-pause-ico::before,
body[data-role="pc"] .pcx-btn.wide.pcx-send-main .pcx-send-pause-ico::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 5px;
  height: 14px;
  background: #fff;
  border-radius: 1px;
}

body[data-role="pc"] .pcx-btn.wide.pcx-send-main .pcx-send-pause-ico::before {
  left: 1px;
}

body[data-role="pc"] .pcx-btn.wide.pcx-send-main .pcx-send-pause-ico::after {
  right: 1px;
}

body[data-role="pc"] .pcx-btn.wide.pcx-send-main .pcx-send-play-ico {
  flex-shrink: 0;
  width: 0;
  height: 0;
  margin-left: 3px;
  border-style: solid;
  border-width: 9px 0 9px 14px;
  border-color: transparent transparent transparent #fff;
  background: transparent;
}

.pcx-dm-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.pcx-dm-right-head {
  margin-bottom: 10px;
}

.pcx-record-head-card {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 10px 14px 12px;
}

.pcx-record-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  color: #1f2937;
}

.pcx-record-title-ico {
  width: 20px;
  height: 20px;
  color: #2563eb;
  flex-shrink: 0;
}

.pcx-record-stats-line {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 14px;
  color: #6b7280;
}

.pcx-record-stat--mid {
  text-align: center;
}

.pcx-record-stat-num {
  color: #2563eb;
  font-weight: 800;
}

.pcx-record-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: #2563eb;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
  justify-self: end;
}

.pcx-record-clear-btn:hover {
  text-decoration: underline;
}

.pcx-record-clear-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.pcx-table-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #eadfca;
  border-radius: 6px;
  container-type: inline-size;
  container-name: pc-record-table;
}

/* PC 发送记录：表格随白框宽度按比例缩放，避免窄屏只能靠横向滚动才能看到 IP */
body[data-role="pc"] .pcx-dm-right .pcx-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

body[data-role="pc"] .pcx-dm-right .pcx-table th:nth-child(1),
body[data-role="pc"] .pcx-dm-right .pcx-table td:nth-child(1) {
  width: 8%;
  min-width: 0;
}

body[data-role="pc"] .pcx-dm-right .pcx-table th:nth-child(2),
body[data-role="pc"] .pcx-dm-right .pcx-table td:nth-child(2) {
  width: 34%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-role="pc"] .pcx-dm-right .pcx-table th:nth-child(3),
body[data-role="pc"] .pcx-dm-right .pcx-table td:nth-child(3) {
  width: 14%;
  min-width: 0;
}

body[data-role="pc"] .pcx-dm-right .pcx-table th:nth-child(4),
body[data-role="pc"] .pcx-dm-right .pcx-table td:nth-child(4) {
  width: 22%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-role="pc"] .pcx-dm-right .pcx-table th:nth-child(5),
body[data-role="pc"] .pcx-dm-right .pcx-table td:nth-child(5) {
  width: 22%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 覆盖上方针对「时间/IP」列的 min-width:120px，否则窄屏仍撑出横向滚动 */
body[data-role="pc"] .pcx-dm-right #recordTableBody td:nth-child(4),
body[data-role="pc"] .pcx-dm-right #recordTableBody td:nth-child(5),
body[data-role="pc"] .pcx-dm-right .pcx-table-scroll .pcx-table thead th:nth-child(4),
body[data-role="pc"] .pcx-dm-right .pcx-table-scroll .pcx-table thead th:nth-child(5) {
  min-width: 0 !important;
}

@container pc-record-table (max-width: 360px) {
  .pcx-table-scroll > .pcx-table {
    font-size: 11px;
  }
}

@container pc-record-table (max-width: 280px) {
  .pcx-table-scroll > .pcx-table {
    font-size: 10px;
  }
}

/* 发送记录表：表头与数据区同为白底 */
.pcx-table-scroll .pcx-table th {
  background: #fff;
}

#syncStatus {
  color: #1f9d45;
}

@media (max-width: 900px) {
  .pcx-body {
    grid-template-columns: 1fr;
  }

  .pcx-side {
    display: flex;
    gap: 2px;
    padding: 6px;
  }

  .pcx-side-item {
    border-left: 0;
    border-radius: 6px;
    padding: 9px 8px;
    text-align: center;
  }

  .pcx-dm-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  body[data-role="pc"] .pcx-dm-layout {
    min-height: 0;
    flex: 1;
  }

  .pcx-dm-left-scroll,
  .pcx-dm-right {
    max-height: none;
    min-height: auto;
  }

  body[data-role="pc"] .pcx-dm-left-scroll,
  body[data-role="pc"] .pcx-dm-right {
    min-height: 0;
  }

  .pc-demo {
    grid-template-columns: 1fr;
  }

  .pc-left-nav {
    display: none;
  }

  .im-layout {
    grid-template-columns: 1fr;
  }

  .message-list {
    height: 380px;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .web-send-box {
    position: static;
    width: 100%;
    margin-top: 10px;
  }
}








