button,
a {
  touch-action: manipulation;
}

.logo {
  height: 50px;
  gap: 11px;
}

.logo > span,
.auth-brand > span {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
}

.topic-grid button.active {
  border-radius: 10px;
  background: var(--soft);
  color: var(--green);
  font-weight: 700;
}

.archive-results .block-head > span,
.block-head > span {
  color: var(--muted);
  font-size: 12px;
}

.dist-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.page.wide {
  width: min(1500px, calc(100% - 42px));
}

.dist-toolbar > button,
.dist-toolbar > label {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.dist-toolbar > button.active,
.dist-toolbar > label.active {
  border-color: #8bbdb5;
  background: var(--soft);
  color: var(--green);
  font-weight: 700;
}

.dist-toolbar select {
  margin-left: 4px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font-weight: inherit;
}

.dist-toolbar > span {
  margin-left: auto;
  color: var(--muted);
  white-space: nowrap;
}

.dist-matrix-wrap {
  overflow-x: auto;
}

.dist-matrix {
  min-width: 1120px;
}

.dist-matrix-head,
.dist-matrix-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) repeat(var(--platforms), minmax(92px, 1fr)) 110px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
}

.dist-matrix-head {
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  background: #f8faf9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dist-matrix-head > span:not(:first-child) {
  text-align: center;
}

.dist-matrix-row {
  min-height: 72px;
  border-bottom: 1px solid #edf0ee;
}

.dist-matrix-row:last-child {
  border-bottom: 0;
}

.dist-article-title {
  min-width: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.dist-article-title strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.dist-article-title small {
  margin-top: 4px;
  color: var(--muted);
}

.dist-status {
  min-width: 78px;
  height: 32px;
  padding: 0 8px;
  border: 2px solid #c2410c;
  border-radius: 8px;
  background: #c2410c;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  font-weight: 800;
  box-shadow: 0 1px 2px #7c2d121f;
}

.dist-status:hover {
  border-color: #9a3412;
  background: #9a3412;
}

.dist-status.published {
  border-color: #087568;
  background: #087568;
  color: #fff;
  font-weight: 700;
}

.dist-status.published:hover {
  border-color: #065f55;
  background: #065f55;
}

.dist-status:disabled {
  opacity: .55;
  cursor: wait;
}

.dist-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dist-progress > span {
  min-width: 27px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
  background: #d97706;
}

.dist-progress > i {
  width: 48px;
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: #e7ebe9;
}

.dist-progress > i > b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #d97706;
}

.dist-progress.complete > span,
.dist-progress.complete > i > b {
  background: #087568;
}

.dist-progress.zero > span,
.dist-progress.zero > i > b {
  background: #b42318;
}

.dist-list-row {
  min-height: 104px;
  padding: 15px 18px;
  border-bottom: 1px solid #edf0ee;
  display: grid;
  grid-template-columns: minmax(260px, 1.15fr) minmax(660px, 2.5fr) 105px;
  align-items: center;
  gap: 18px;
}

.dist-list-row:last-child {
  border-bottom: 0;
}

.dist-inline-platforms {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(88px, 1fr));
  gap: 7px;
}

.dist-inline-platforms label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.dist-inline-platforms label > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dist-inline-platforms .dist-status {
  width: 100%;
  min-width: 0;
}

.knowledge-row.with-distribution {
  min-height: 142px;
  align-items: flex-start;
}

.knowledge-row.with-distribution .item-icon,
.knowledge-row.with-distribution .open-arrow {
  margin-top: 5px;
}

.row-title {
  align-items: center;
  flex-wrap: wrap;
}

.library-dist-count {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #d97706;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.library-dist-count.complete {
  background: #087568;
}

.library-dist-count.zero {
  background: #b42318;
}

.share-trigger {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #9bc8c0;
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}

.share-trigger:hover {
  background: var(--soft);
}

.share-sheet {
  padding: 0 22px 22px;
}

.share-security {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--soft);
  color: #356d65;
  font-size: 14px;
}

.share-link-label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.share-link-label input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8faf9;
  color: var(--ink);
}

.share-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 9px;
}

.share-platforms {
  margin: 16px 0 0;
  padding: 12px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.share-platforms legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.share-platforms label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}

.share-platforms input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.share-platforms small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
}

.share-actions button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

.share-actions button.primary {
  border: 0;
  background: var(--green);
  color: #fff;
}

.share-revoke {
  margin-top: 20px;
  padding: 7px 0;
  border: 0;
  background: none;
  color: #9b5d4c;
  font-size: 13px;
}

.wechat-share-tip {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.library-distribution {
  margin-top: 10px;
  display: grid !important;
  grid-template-columns: repeat(7, minmax(88px, 1fr));
  gap: 7px;
}

.library-distribution label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.library-distribution label > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-distribution .dist-status {
  width: 100%;
  min-width: 0;
}

.item-distribution {
  flex: 0 0 auto;
  padding: 12px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.item-dist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.item-dist-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.item-dist-platforms label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.item-dist-platforms .dist-status {
  width: 100%;
}

@media (max-width: 760px) {
  .page.wide {
    width: calc(100% - 20px);
  }

  .dist-toolbar > span {
    display: none;
  }

  .dist-matrix {
    min-width: 1080px;
  }

  .item-distribution {
    max-height: 190px;
    padding: 10px 12px 12px;
    overflow-y: auto;
  }

  .item-dist-platforms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dist-list-row {
    padding: 16px 12px 18px;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .dist-list-row > .dist-progress {
    align-self: start;
    margin-top: 7px;
  }

  .dist-inline-platforms {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .dist-inline-platforms label {
    font-size: 14px;
  }

  .dist-inline-platforms .dist-status {
    height: 40px;
  }

  .knowledge-row.with-distribution {
    min-height: 0;
  }

  .library-distribution {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .library-distribution label {
    font-size: 14px;
  }

  .library-distribution .dist-status {
    height: 40px;
  }

  .share-trigger {
    height: 36px;
    font-size: 15px;
  }

  .share-sheet {
    padding: 0 16px 18px;
  }

  .share-actions {
    grid-template-columns: 1fr;
  }

  .share-platforms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .share-platforms label {
    min-height: 34px;
    font-size: 16px;
  }

  .share-actions button {
    min-height: 46px;
    font-size: 16px;
  }
}

/* 大字版：为长期阅读和触屏操作提高整体可读性 */
body {
  font-size: 17px;
}

.side nav button,
.top > button:first-of-type,
.primary,
.tabs button,
.block-head button,
.confirm,
.download-link,
.download-view a,
.dist-toolbar,
.dist-status {
  font-size: 15px;
}

.user strong,
.welcome p,
.welcome div > span,
.stats span,
.page-title p,
.row-copy p,
.recent-grid small,
.project-grid span,
.topic-grid small,
.article-list small,
.item-view-head small,
.sheet-title p,
.drop small,
.auth-card > p,
.auth-form label,
.item-dist-platforms label,
.dist-matrix-head {
  font-size: 14px;
}

.user small,
.user a,
.row-copy em,
.tag-row span,
.empty span,
.auth-card > small,
.form-error,
.archive-results .block-head > span,
.block-head > span {
  font-size: 13px;
}

.row-copy strong,
.recent-grid strong,
.project-grid strong,
.topic-grid strong,
.article-list strong,
.dist-article-title strong {
  font-size: 16px;
}

.block-head h2,
.item-view-head h2 {
  font-size: 18px;
}

.side nav button {
  min-height: 48px;
}

.knowledge-row,
.topic-grid button,
.article-list button,
.dist-matrix-row {
  min-height: 78px;
}

@media (max-width: 760px) {
  body {
    font-size: 18px;
  }

  .top > strong,
  .row-copy strong,
  .recent-grid strong,
  .project-grid strong,
  .topic-grid strong,
  .article-list strong,
  .item-view-head h2 {
    font-size: 17px;
  }

  .bottom {
    height: 70px;
  }

  .bottom button span,
  .row-copy p,
  .recent-grid small,
  .project-grid span,
  .topic-grid small,
  .article-list small,
  .tag-row span,
  .item-dist-platforms label {
    font-size: 14px;
  }

  .page {
    padding-bottom: 92px;
  }

  .docx-view {
    font-size: 19px;
    line-height: 1.9;
  }

  .excel-table table {
    font-size: 17px;
  }
}
