/* knit-compact.css — 手机 + 平板共用
 * 由 tools/split-knit-device-css.js 从 knit.css 拆出。共享样式仍在 knit.css。
 * 修改对应端布局时优先改本文件，避免三端规则混在一起。
 */
/* 手机/平板没有 hover：整圆可点更换，但不要常显深色底条（会从圆形后漏出黑边） */
html[data-device="phone"] .knit-mine-avatar-change,
html[data-device="tablet"] .knit-mine-avatar-change {
  opacity: 1;
  inset: 0;
  border-radius: inherit;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
  padding: 0;
}

html[data-device="phone"] .knit-favorite-public-cols,
html[data-device="tablet"] .knit-favorite-public-cols {
  display: none;
}

html[data-device="phone"] #knitFavoritePublicGrid,
html[data-device="tablet"] #knitFavoritePublicGrid {
  min-width: 0 !important;
  width: 100% !important;
}

html[data-device="phone"] #knitFavoritePublicGrid > .knit-card,
html[data-device="tablet"] #knitFavoritePublicGrid > .knit-card {
  width: 100%;
}

html[data-device="phone"] .knit-grid > .knit-card,
html[data-device="phone"] #knitGrid > .knit-card,
html[data-device="phone"] #knitGridNews > .knit-card,
html[data-device="phone"] #knitGridYarn > .knit-card,
html[data-device="phone"] #knitUserProfileGrid > .knit-card,
html[data-device="phone"] #knitFavoritePublicGrid > .knit-card,
html[data-device="tablet"] .knit-grid > .knit-card,
html[data-device="tablet"] #knitGrid > .knit-card,
html[data-device="tablet"] #knitGridNews > .knit-card,
html[data-device="tablet"] #knitGridYarn > .knit-card,
html[data-device="tablet"] #knitUserProfileGrid > .knit-card,
html[data-device="tablet"] #knitFavoritePublicGrid > .knit-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  align-self: start;
  contain: layout paint;
  content-visibility: auto;
  contain-intrinsic-size: auto 220px;
}

/* 定高网格：取消 contain，避免行高被算成 2px/占位高度导致卡片叠在一起 */
html[data-device="phone"] .knit-grid.knit-grid--fixed-height > .knit-card,
html[data-device="phone"] .knit-grid[data-knit-feed-layout="fixed"] > .knit-card,
html[data-device="phone"] #knitGrid.knit-grid--fixed-height > .knit-card,
html[data-device="phone"] #knitGrid[data-knit-feed-layout="fixed"] > .knit-card,
html[data-device="phone"] #knitGridNews.knit-grid--fixed-height > .knit-card,
html[data-device="phone"] #knitGridNews[data-knit-feed-layout="fixed"] > .knit-card,
html[data-device="phone"] #knitGridYarn.knit-grid--fixed-height > .knit-card,
html[data-device="phone"] #knitGridYarn[data-knit-feed-layout="fixed"] > .knit-card,
html[data-device="tablet"] .knit-grid.knit-grid--fixed-height > .knit-card,
html[data-device="tablet"] .knit-grid[data-knit-feed-layout="fixed"] > .knit-card,
html[data-device="tablet"] #knitGrid.knit-grid--fixed-height > .knit-card,
html[data-device="tablet"] #knitGrid[data-knit-feed-layout="fixed"] > .knit-card,
html[data-device="tablet"] #knitGridNews.knit-grid--fixed-height > .knit-card,
html[data-device="tablet"] #knitGridNews[data-knit-feed-layout="fixed"] > .knit-card,
html[data-device="tablet"] #knitGridYarn.knit-grid--fixed-height > .knit-card,
html[data-device="tablet"] #knitGridYarn[data-knit-feed-layout="fixed"] > .knit-card {
  contain: none;
  content-visibility: visible;
  contain-intrinsic-size: auto;
  width: 100% !important;
}

html[data-device="phone"] .knit-grid.knit-grid--packed,
html[data-device="tablet"] .knit-grid.knit-grid--packed {
  display: block;
  position: relative;
  overflow-anchor: none;
}

html[data-device="phone"] #knitGrid.knit-grid--packed > .knit-card,
html[data-device="phone"] #knitGridNews.knit-grid--packed > .knit-card,
html[data-device="phone"] #knitGridYarn.knit-grid--packed > .knit-card,
html[data-device="phone"] #knitUserProfileGrid.knit-grid--packed > .knit-card,
html[data-device="phone"] #knitFavoritePublicGrid.knit-grid--packed > .knit-card,
html[data-device="tablet"] #knitGrid.knit-grid--packed > .knit-card,
html[data-device="tablet"] #knitGridNews.knit-grid--packed > .knit-card,
html[data-device="tablet"] #knitGridYarn.knit-grid--packed > .knit-card,
html[data-device="tablet"] #knitUserProfileGrid.knit-grid--packed > .knit-card,
html[data-device="tablet"] #knitFavoritePublicGrid.knit-grid--packed > .knit-card {
  margin: 0;
  touch-action: pan-y;
  content-visibility: auto;
  contain: layout paint;
}

html[data-device="phone"] .knit-grid.knit-grid--packed > .knit-home-feed-more,
html[data-device="tablet"] .knit-grid.knit-grid--packed > .knit-home-feed-more {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  grid-column: auto;
}

html[data-device="phone"] .knit-grid > .knit-card.knit-card--open,
html[data-device="phone"] #knitGrid > .knit-card.knit-card--open,
html[data-device="tablet"] .knit-grid > .knit-card.knit-card--open,
html[data-device="tablet"] #knitGrid > .knit-card.knit-card--open {
  contain: none;
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

html[data-device="phone"] .knit-cell--img,
html[data-device="tablet"] .knit-cell--img {
  /* 比例由 JS 按图片宽高写入；绝对铺满，避免解码后撑高卡片 */
  overflow: clip;
  background: #111;
  min-height: 0;
  height: auto;
}

html[data-device="phone"] .knit-card--loading-img .knit-cell--img,
html[data-device="tablet"] .knit-card--loading-img .knit-cell--img,
html[data-device="phone"] .knit-card--skel .knit-cell--img,
html[data-device="tablet"] .knit-card--skel .knit-cell--img {
  aspect-ratio: 3 / 4;
  min-height: 48px;
  background: linear-gradient(
    90deg,
    var(--knit-view-bg, #f3f4f6) 0%,
    rgba(128, 128, 128, 0.16) 46%,
    var(--knit-view-bg, #f3f4f6) 100%
  );
  background-size: 220% 100%;
  animation: knit-skel-shimmer 1.25s ease-in-out infinite;
}

html[data-device="phone"] .knit-card--preplace,
html[data-device="tablet"] .knit-card--preplace {
  opacity: 0;
  pointer-events: none;
}

html[data-device="phone"] .knit-cell--img img,
html[data-device="tablet"] .knit-cell--img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* 窄窗紧凑侧栏仅作用于手机/平板；真电脑缩窗仍保持桌面顶栏与侧栏 */
@media (max-width: 768px) {
  html[data-device="phone"][data-knit-sidebar-ui="fixed"] .knit-sidebar,
  html[data-device="tablet"][data-knit-sidebar-ui="fixed"] .knit-sidebar {
    width: var(--knit-side-w);
    padding: 0.75rem 0.35rem;
  }

  html[data-device="phone"][data-knit-sidebar-ui="fixed"] .knit-main,
  html[data-device="tablet"][data-knit-sidebar-ui="fixed"] .knit-main {
    margin-left: var(--knit-side-w);
    width: calc(100% - var(--knit-side-w));
  }

  html[data-device="phone"] .knit-sidebar:hover,
  html[data-device="tablet"] .knit-sidebar:hover {
    width: var(--knit-side-w);
    padding: 0.75rem 0.35rem;
  }
  html[data-device="phone"] .knit-sidebar:hover button:not([hidden]),
  html[data-device="tablet"] .knit-sidebar:hover button:not([hidden]) {
    font-size: 0.72rem;
    padding: 0.45rem 0.25rem;
    text-align: center;
  }
  html[data-device="phone"] .knit-sidebar button[hidden],
  html[data-device="tablet"] .knit-sidebar button[hidden] {
    display: none !important;
  }
  html[data-device="phone"] .knit-side-submenu,
  html[data-device="tablet"] .knit-side-submenu {
    margin-left: 0;
    padding: 0.2rem 0.08rem;
    border-left: none;
    background: transparent;
  }
  html[data-device="phone"] .knit-side-submenu .knit-side-sub-btn,
  html[data-device="tablet"] .knit-side-submenu .knit-side-sub-btn {
    justify-content: center;
    padding: 0.35rem 0.1rem;
    gap: 0.18rem;
    font-size: 0.68rem;
  }
  html[data-device="phone"] .knit-side-submenu .knit-side-sub-btn::before,
  html[data-device="tablet"] .knit-side-submenu .knit-side-sub-btn::before {
    font-size: 0.56rem;
  }
  html[data-device="phone"] .knit-side-collapse-btn::after,
  html[data-device="tablet"] .knit-side-collapse-btn::after {
    right: 0.2rem;
  }
  html[data-device="phone"] .knit-main,
  html[data-device="tablet"] .knit-main {
    margin-left: var(--knit-side-w-collapsed);
    width: calc(100% - var(--knit-side-w-collapsed));
  }
  html[data-device="phone"] .knit-brand,
  html[data-device="tablet"] .knit-brand {
    display: none;
  }
  html[data-device="phone"] .knit-topnav,
  html[data-device="tablet"] .knit-topnav {
    display: none;
  }
}

html[data-device="phone"] .knit-settings-modal__panel,
html[data-device="tablet"] .knit-settings-modal__panel {
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100%;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

html[data-device="phone"],
html[data-device="tablet"] {
  --knit-bottom-nav-h: 58px;
  --knit-grid-ref-w: 100%;
  --knit-chrome-radius: 22px;
  --knit-chrome-overlap: 0px;
  --knit-chrome-gap: 0.32rem;
  --knit-top-overlay: 48px;
  --knit-page-pad-x: clamp(0.4rem, 2.4vw, 0.75rem);
}

html[data-device="phone"] .knit-bottom-nav__btn--yarn-merged,
html[data-device="tablet"] .knit-bottom-nav__btn--yarn-merged,
html[data-device="phone"] .knit-bottom-nav__btn[data-knit-nav="yarn"],
html[data-device="tablet"] .knit-bottom-nav__btn[data-knit-nav="yarn"] {
  display: none !important;
}

html[data-device="phone"] .knit-mine-fold-head,
html[data-device="tablet"] .knit-mine-fold-head {
  display: none !important;
}

html[data-device="phone"] .knit-mine-option-row,
html[data-device="tablet"] .knit-mine-option-row {
  padding: 0.35rem 0.1rem 0.08rem;
  gap: 0.2rem;
}

html[data-device="phone"] .knit-mine-option-btn,
html[data-device="tablet"] .knit-mine-option-btn {
  height: 2rem;
  padding: 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 550;
}

html[data-device="phone"] .knit-mine-option-row.knit-seg-row,
html[data-device="tablet"] .knit-mine-option-row.knit-seg-row {
  isolation: isolate;
  overflow: hidden;
  touch-action: pan-x;
}

html[data-device="phone"] .knit-mine-option-row.knit-seg-row > .knit-seg-thumb,
html[data-device="tablet"] .knit-mine-option-row.knit-seg-row > .knit-seg-thumb {
  position: absolute;
  z-index: 0;
  left: 0;
  top: 0;
  width: var(--knit-seg-w, 0px);
  height: var(--knit-seg-h, 0px);
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: var(--knit-chrome-active);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transform: translate3d(var(--knit-seg-x, 0px), var(--knit-seg-y, 0px), 0);
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.16s ease;
  pointer-events: none;
  flex: 0 0 auto;
}

html[data-device="phone"] .knit-mine-option-row.is-seg-jump > .knit-seg-thumb,
html[data-device="tablet"] .knit-mine-option-row.is-seg-jump > .knit-seg-thumb,
html[data-device="phone"] .knit-mine-option-row.is-seg-dragging > .knit-seg-thumb,
html[data-device="tablet"] .knit-mine-option-row.is-seg-dragging > .knit-seg-thumb {
  transition: none;
}

html[data-device="phone"] .knit-mine-option-row.knit-seg-row > .knit-mine-option-btn,
html[data-device="tablet"] .knit-mine-option-row.knit-seg-row > .knit-mine-option-btn,
html[data-device="phone"] .knit-mine-option-row.knit-seg-row > .knit-mine-option-btn.is-active,
html[data-device="phone"] .knit-mine-option-row.knit-seg-row > .knit-mine-option-btn:active,
html[data-device="phone"] .knit-mine-option-row.knit-seg-row > .knit-mine-option-btn.is-active:active,
html[data-device="tablet"] .knit-mine-option-row.knit-seg-row > .knit-mine-option-btn.is-active,
html[data-device="tablet"] .knit-mine-option-row.knit-seg-row > .knit-mine-option-btn:active,
html[data-device="tablet"] .knit-mine-option-row.knit-seg-row > .knit-mine-option-btn.is-active:active {
  z-index: 1;
  background: transparent;
  border-color: transparent;
}

html[data-device="phone"] .knit-mine-option-row.knit-seg-row > .knit-mine-option-btn.is-active,
html[data-device="tablet"] .knit-mine-option-row.knit-seg-row > .knit-mine-option-btn.is-active {
  color: var(--knit-chrome-active-text);
  font-size: 0.92rem;
  font-weight: 780;
}

html[data-device="phone"] .knit-mine-option-row.knit-seg-row.is-seg-dragging > .knit-mine-option-btn:active,
html[data-device="tablet"] .knit-mine-option-row.knit-seg-row.is-seg-dragging > .knit-mine-option-btn:active {
  transform: none;
}

html[data-device="phone"] .knit-mine-option-row.knit-seg-row > .knit-mine-option-btn.is-seg-hot,
html[data-device="tablet"] .knit-mine-option-row.knit-seg-row > .knit-mine-option-btn.is-seg-hot {
  color: var(--knit-chrome-active-text);
}

html[data-device="phone"] .knit-mine-option-row.knit-seg-row.is-seg-dragging > .knit-mine-option-btn.is-active:not(.is-seg-hot),
html[data-device="tablet"] .knit-mine-option-row.knit-seg-row.is-seg-dragging > .knit-mine-option-btn.is-active:not(.is-seg-hot) {
  color: var(--knit-chrome-text-muted);
}

html[data-device="phone"] .knit-mine-like-stat,
html[data-device="tablet"] .knit-mine-like-stat {
  margin-left: 0.45rem;
  font-size: 0.76rem;
}

html[data-device="phone"] .knit-mine-history-title,
html[data-device="tablet"] .knit-mine-history-title {
  display: block;
}

html[data-device="phone"] .knit-mine-history,
html[data-device="tablet"] .knit-mine-history {
  padding-left: 0;
  padding-right: 0;
  border-bottom: none;
}

html[data-device="phone"] .knit-mine-history-list {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0 0.15rem 0.2rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

html[data-device="phone"] .knit-mine-history .knit-mine-empty {
  margin: 0.2rem 0 0.4rem;
  padding: 0.35rem 0;
}

html[data-device="phone"] .knit-mine-history-card {
  flex: 0 0 7.1rem;
  width: 7.1rem;
}

html[data-device="tablet"] .knit-mine-history-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

html[data-device="phone"] .knit-mine-fold > .knit-mine-works,
html[data-device="tablet"] .knit-mine-fold > .knit-mine-works {
  border-top: none;
}

/* 手机/平板「我的」：列表内滚，避开底栏；滚轮始终在内容区 */
html[data-device="phone"] #knitMineView.knit-mine-view,
html[data-device="tablet"] #knitMineView.knit-mine-view {
  overflow: hidden !important;
  padding-bottom: 0;
}

html[data-device="phone"] #knitMineView #knitMineListSurface,
html[data-device="tablet"] #knitMineView #knitMineListSurface {
  padding-bottom: calc(var(--knit-bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 0.85rem);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

html[data-device="phone"] .knit-mine-works .knit-channel-pager,
html[data-device="tablet"] .knit-mine-works .knit-channel-pager,
html[data-device="phone"] .knit-mine-works .knit-channel-pager__pane,
html[data-device="tablet"] .knit-mine-works .knit-channel-pager__pane,
html[data-device="phone"] .knit-mine-works .knit-channel-pager__slot,
html[data-device="tablet"] .knit-mine-works .knit-channel-pager__slot {
  background: transparent !important;
}

html[data-device="phone"] .knit-mine-works .knit-channel-pager__hint,
html[data-device="tablet"] .knit-mine-works .knit-channel-pager__hint {
  min-height: 8rem;
}

html[data-device="phone"] .knit-mine-channel-tab,
html[data-device="tablet"] .knit-mine-channel-tab {
  min-height: 44px;
  font-size: 0.92rem;
}

html[data-device="phone"] .knit-mine-more-btn,
html[data-device="tablet"] .knit-mine-more-btn {
  display: inline-flex;
}

html[data-device="phone"] .knit-mobile-notes-btn,
html[data-device="tablet"] .knit-mobile-notes-btn,
html[data-device="phone"] .knit-mobile-fav-float-btn,
html[data-device="tablet"] .knit-mobile-fav-float-btn {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0 0.05rem 0 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--knit-chrome-text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

html[data-device="phone"] .knit-app.knit-app--mobile-home-tabs .knit-mobile-notes-btn:not([hidden]),
html[data-device="tablet"] .knit-app.knit-app--mobile-home-tabs .knit-mobile-notes-btn:not([hidden]) {
  display: inline-flex;
}

html[data-device="phone"] .knit-mobile-fav-float-btn,
html[data-device="tablet"] .knit-mobile-fav-float-btn,
html[data-device="phone"] .knit-app.knit-app--mobile-home-tabs .knit-mobile-fav-float-btn,
html[data-device="tablet"] .knit-app.knit-app--mobile-home-tabs .knit-mobile-fav-float-btn {
  display: none !important;
}

html[data-device="phone"] .knit-mobile-notes-btn:active,
html[data-device="tablet"] .knit-mobile-notes-btn:active,
html[data-device="phone"] .knit-mobile-fav-float-btn:active,
html[data-device="tablet"] .knit-mobile-fav-float-btn:active {
  background: var(--knit-chrome-hover);
}

html[data-device="phone"] .knit-mobile-fav-float-btn.is-active,
html[data-device="tablet"] .knit-mobile-fav-float-btn.is-active {
  color: #d97706;
}

html[data-device="phone"] .knit-bottom-nav__btn[data-knit-nav="notes"],
html[data-device="tablet"] .knit-bottom-nav__btn[data-knit-nav="notes"] {
  display: none !important;
}

html[data-device="phone"] .knit-mobile-home-tabs,
html[data-device="tablet"] .knit-mobile-home-tabs {
  display: none;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 0.2rem;
  min-width: 0;
  height: 100%;
  padding: 0 0.1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

html[data-device="phone"] .knit-mobile-home-tabs::-webkit-scrollbar,
html[data-device="tablet"] .knit-mobile-home-tabs::-webkit-scrollbar {
  display: none;
}

html[data-device="phone"] .knit-mobile-home-tabs:not([hidden]),
html[data-device="tablet"] .knit-mobile-home-tabs:not([hidden]) {
  display: flex;
}

html[data-device="phone"] .knit-mobile-home-tab,
html[data-device="tablet"] .knit-mobile-home-tab {
  appearance: none;
  margin: 0;
  flex: 1 1 0;
  min-width: 2.4rem;
  height: 2rem;
  padding: 0 0.35rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--knit-chrome-text-muted);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 550;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

html[data-device="phone"] .knit-mobile-home-tab.is-active,
html[data-device="tablet"] .knit-mobile-home-tab.is-active {
  color: var(--knit-chrome-active-text);
  background: var(--knit-chrome-active);
  font-size: 1.02rem;
  font-weight: 780;
}

html[data-device="phone"] .knit-mobile-home-tab.is-active::after,
html[data-device="tablet"] .knit-mobile-home-tab.is-active::after {
  display: none;
}

html[data-device="phone"] .knit-mobile-home-tab .knit-nav-dot,
html[data-device="tablet"] .knit-mobile-home-tab .knit-nav-dot {
  top: 0.02rem;
  right: calc(50% - 1.22rem);
  width: 0.42rem;
  min-width: 0.42rem;
  height: 0.42rem;
}

html[data-device="phone"] .knit-home-category-bar-row,
html[data-device="tablet"] .knit-home-category-bar-row {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-top: calc(var(--knit-top-overlay) + 0.2rem);
  margin-left: max(0.35rem, env(safe-area-inset-left, 0px));
  margin-right: max(0.35rem, env(safe-area-inset-right, 0px));
  position: relative;
  z-index: 4;
  overflow: visible;
}

html[data-device="phone"] .knit-home-category-bar-row:has(.knit-home-category-bar:not(.is-collapsed):not([hidden])),
html[data-device="tablet"] .knit-home-category-bar-row:has(.knit-home-category-bar:not(.is-collapsed):not([hidden])) {
  z-index: 120;
}

html[data-device="phone"] .knit-home-category-bar-row[hidden],
html[data-device="tablet"] .knit-home-category-bar-row[hidden] {
  display: none !important;
}

html[data-device="phone"] .knit-home-category-bar-row.is-scroll-pushed,
html[data-device="tablet"] .knit-home-category-bar-row.is-scroll-pushed {
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-0.65rem);
}

html[data-device="phone"] .knit-home-category-bar-row > .knit-home-category-bar,
html[data-device="tablet"] .knit-home-category-bar-row > .knit-home-category-bar {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
}

html[data-device="phone"] .knit-home-category-bar-row > .knit-home-category-bar[hidden],
html[data-device="tablet"] .knit-home-category-bar-row > .knit-home-category-bar[hidden] {
  display: none !important;
}

html[data-device="phone"] .knit-home-category-bar__layout-btn,
html[data-device="tablet"] .knit-home-category-bar__layout-btn {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 2.15rem;
  height: 2.15rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--knit-control-border, rgba(0, 0, 0, 0.1));
  border-radius: 0.55rem;
  background: var(--knit-panel-bg, #fff);
  color: var(--knit-text-body);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

html[data-device="phone"] .knit-home-category-bar-row > .knit-home-category-bar__layout-btn:not([hidden]),
html[data-device="tablet"] .knit-home-category-bar-row > .knit-home-category-bar__layout-btn:not([hidden]) {
  display: inline-flex !important;
}

html[data-device="phone"] .knit-home-category-bar__layout-btn:active,
html[data-device="tablet"] .knit-home-category-bar__layout-btn:active,
html[data-device="phone"] body.knit-mobile-layout-sheet-open .knit-home-category-bar__layout-btn,
html[data-device="tablet"] body.knit-mobile-layout-sheet-open .knit-home-category-bar__layout-btn {
  background: var(--knit-control-hover-bg, rgba(0, 0, 0, 0.06));
}

html[data-device="phone"] .knit-mobile-layout-sheet,
html[data-device="tablet"] .knit-mobile-layout-sheet {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  pointer-events: none;
}

html[data-device="phone"] .knit-mobile-layout-sheet:not([hidden]),
html[data-device="tablet"] .knit-mobile-layout-sheet:not([hidden]) {
  pointer-events: auto;
}

html[data-device="phone"] .knit-mobile-layout-sheet__backdrop,
html[data-device="tablet"] .knit-mobile-layout-sheet__backdrop {
  display: none;
}

html[data-device="phone"] .knit-mobile-layout-sheet__panel,
html[data-device="tablet"] .knit-mobile-layout-sheet__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: calc(0.35rem + env(safe-area-inset-top, 0px)) 0 calc(0.65rem + env(safe-area-inset-bottom, 0px));
  border-radius: 0;
  background: var(--knit-panel-bg, #fff);
  color: var(--knit-text-body);
  box-shadow: none;
  transform: translateX(8%);
  opacity: 0;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease;
  overflow: hidden;
  touch-action: pan-y;
}

html[data-device="phone"] .knit-mobile-layout-sheet[data-sheet-size="tall"] .knit-mobile-layout-sheet__panel,
html[data-device="tablet"] .knit-mobile-layout-sheet[data-sheet-size="tall"] .knit-mobile-layout-sheet__panel {
  height: 100%;
}

html[data-device="phone"] body.knit-mobile-layout-sheet-open .knit-mobile-layout-sheet__panel,
html[data-device="tablet"] body.knit-mobile-layout-sheet-open .knit-mobile-layout-sheet__panel {
  transform: translateX(0);
  opacity: 1;
}

html[data-device="phone"] .knit-mobile-layout-sheet__grab,
html[data-device="tablet"] .knit-mobile-layout-sheet__grab {
  display: none !important;
}

html[data-device="phone"] .knit-mobile-layout-sheet__handle,
html[data-device="tablet"] .knit-mobile-layout-sheet__handle {
  width: 2.4rem;
  height: 0.28rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--knit-text-muted, #94a3b8) 55%, transparent);
}

html[data-device="phone"] .knit-mobile-layout-sheet__head,
html[data-device="tablet"] .knit-mobile-layout-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex: 0 0 auto;
  margin: 0;
  padding: 0.15rem 0.75rem 0.45rem;
}

html[data-device="phone"] .knit-mobile-layout-sheet__back,
html[data-device="tablet"] .knit-mobile-layout-sheet__back {
  width: 2.15rem;
  height: 2.15rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.55rem;
  background: var(--knit-control-hover-bg, rgba(0, 0, 0, 0.06));
  color: var(--knit-text-heading);
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

html[data-device="phone"] .knit-mobile-layout-sheet__head h2,
html[data-device="tablet"] .knit-mobile-layout-sheet__head h2 {
  margin: 0;
  flex: 1 1 auto;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--knit-text-heading);
}

html[data-device="phone"] .knit-mobile-layout-sheet__head-spacer,
html[data-device="tablet"] .knit-mobile-layout-sheet__head-spacer {
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 auto;
}

html[data-device="phone"] .knit-mobile-layout-sheet__close,
html[data-device="tablet"] .knit-mobile-layout-sheet__close {
  display: none !important;
}

html[data-device="phone"] .knit-mobile-layout-pages,
html[data-device="tablet"] .knit-mobile-layout-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15rem 0.2rem;
  margin: 0 0 0.65rem;
  padding: 0 0.35rem;
}

html[data-device="phone"] .knit-mobile-layout-pages__tab,
html[data-device="tablet"] .knit-mobile-layout-pages__tab {
  margin: 0;
  padding: 0.28rem 0.2rem;
  border: 0;
  background: transparent;
  color: var(--knit-text-muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

html[data-device="phone"] .knit-mobile-layout-pages__tab.is-active,
html[data-device="tablet"] .knit-mobile-layout-pages__tab.is-active {
  color: var(--knit-text-heading);
  font-weight: 750;
}

html[data-device="phone"] .knit-mobile-layout-pages__tab.is-locked,
html[data-device="tablet"] .knit-mobile-layout-pages__tab.is-locked,
html[data-device="phone"] .knit-mobile-layout-pages__tab:disabled,
html[data-device="tablet"] .knit-mobile-layout-pages__tab:disabled {
  color: var(--knit-text-muted);
  opacity: 0.42;
  cursor: not-allowed;
  font-weight: 600;
  pointer-events: none;
}

html[data-device="phone"] .knit-mobile-layout-pages__sep,
html[data-device="tablet"] .knit-mobile-layout-pages__sep {
  color: var(--knit-text-muted);
  opacity: 0.55;
  font-size: 0.85rem;
  user-select: none;
}

html[data-device="phone"] .knit-mobile-layout-duo,
html[data-device="tablet"] .knit-mobile-layout-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
}

html[data-device="phone"] .knit-mobile-layout-duo__card,
html[data-device="tablet"] .knit-mobile-layout-duo__card {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html[data-device="phone"] .knit-mobile-layout-duo__card.is-active,
html[data-device="tablet"] .knit-mobile-layout-duo__card.is-active {
  background: transparent;
  box-shadow: none;
}

html[data-device="phone"] .knit-mobile-layout-duo__card.is-active .knit-mobile-layout-duo__preview .knit-feed-layout-preview__stage,
html[data-device="tablet"] .knit-mobile-layout-duo__card.is-active .knit-mobile-layout-duo__preview .knit-feed-layout-preview__stage {
  border-color: color-mix(in srgb, var(--knit-accent, #c93030) 55%, var(--knit-control-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--knit-accent, #c93030) 35%, transparent);
}

html[data-device="phone"] .knit-mobile-layout-duo__name,
html[data-device="tablet"] .knit-mobile-layout-duo__name {
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.2;
  color: var(--knit-text-heading);
}

html[data-device="phone"] .knit-mobile-layout-duo__preview,
html[data-device="tablet"] .knit-mobile-layout-duo__preview {
  margin: 0;
  pointer-events: none;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__stage,
html[data-device="tablet"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__stage {
  max-height: 10rem;
  min-height: 10rem;
  padding: 0.22rem;
  border: 1px solid var(--knit-control-border, rgba(0, 0, 0, 0.1));
  border-radius: 0.7rem;
  overflow: hidden;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__grid,
html[data-device="tablet"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__grid {
  gap: 0.12rem;
  row-gap: 0.12rem;
  column-gap: 0.12rem;
}

/* 砖石：多列用 margin 控上下距（row-gap 对 column 无效）；block 去掉 inline-block 基线空隙 */
html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-feed-layout="waterfall"] .knit-feed-layout-preview__grid,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-feed-layout="waterfall"] .knit-feed-layout-preview__grid {
  column-gap: 0.12rem;
  line-height: 0;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-feed-layout="waterfall"] .knit-feed-layout-preview__card,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-feed-layout="waterfall"] .knit-feed-layout-preview__card {
  display: block;
  width: 100%;
  margin: 0 0 0.12rem;
  vertical-align: top;
  line-height: normal;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__thumb,
html[data-device="tablet"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__thumb {
  border-radius: 0.22rem;
  aspect-ratio: auto;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-feed-layout="waterfall"] .knit-feed-layout-preview__card[data-h="tall"] .knit-feed-layout-preview__thumb,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-feed-layout="waterfall"] .knit-feed-layout-preview__card[data-h="tall"] .knit-feed-layout-preview__thumb {
  height: 0.92rem;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-feed-layout="waterfall"] .knit-feed-layout-preview__card[data-h="mid"] .knit-feed-layout-preview__thumb,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-feed-layout="waterfall"] .knit-feed-layout-preview__card[data-h="mid"] .knit-feed-layout-preview__thumb {
  height: 0.72rem;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-feed-layout="waterfall"] .knit-feed-layout-preview__card[data-h="short"] .knit-feed-layout-preview__thumb,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-feed-layout="waterfall"] .knit-feed-layout-preview__card[data-h="short"] .knit-feed-layout-preview__thumb {
  height: 0.56rem;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-feed-layout="fixed"] .knit-feed-layout-preview__thumb,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-feed-layout="fixed"] .knit-feed-layout-preview__thumb {
  height: 0.72rem;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__meta,
html[data-device="tablet"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__meta {
  gap: 0.1rem;
  margin-top: 0;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__card,
html[data-device="tablet"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__card {
  gap: 0.1rem;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-author-meta="1"] .knit-feed-layout-preview__meta,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-author-meta="1"] .knit-feed-layout-preview__meta {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.12rem 0.12rem 0.14rem;
  border-radius: 0;
  background: #e8eaee;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-author-meta="1"] .knit-feed-layout-preview__footer,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-author-meta="1"] .knit-feed-layout-preview__footer {
  display: flex;
  align-items: center;
  gap: 0.08rem;
  padding: 0.1rem 0.12rem 0.12rem;
  background: #e8eaee;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-author-meta="0"] .knit-feed-layout-preview__footer,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-author-meta="0"] .knit-feed-layout-preview__footer {
  display: none;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-show-avatar="0"][data-knit-show-nickname="0"] .knit-feed-layout-preview__head,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-show-avatar="0"][data-knit-show-nickname="0"] .knit-feed-layout-preview__head {
  display: none !important;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-show-avatar="0"] .knit-feed-layout-preview__ava,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-show-avatar="0"] .knit-feed-layout-preview__ava {
  display: none;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-show-nickname="0"] .knit-feed-layout-preview__nick,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-show-nickname="0"] .knit-feed-layout-preview__nick {
  display: none;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-show-time="0"] .knit-feed-layout-preview__time,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-show-time="0"] .knit-feed-layout-preview__time,
html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-show-views="0"] .knit-feed-layout-preview__views,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-show-views="0"] .knit-feed-layout-preview__views {
  display: none;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-author-meta="1"] .knit-feed-layout-preview__head,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-author-meta="1"] .knit-feed-layout-preview__head {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.12rem 0.12rem 0.1rem;
  background: #e8eaee;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-author-meta="0"] .knit-feed-layout-preview__head,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-author-meta="0"] .knit-feed-layout-preview__head {
  display: none;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-author-meta="1"] .knit-feed-layout-preview__card,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-author-meta="1"] .knit-feed-layout-preview__card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  border-radius: 0.28rem;
  overflow: hidden;
  background: #e8eaee;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

html[data-device="phone"] .knit-mobile-layout-duo__preview[data-knit-author-meta="1"] .knit-feed-layout-preview__thumb,
html[data-device="tablet"] .knit-mobile-layout-duo__preview[data-knit-author-meta="1"] .knit-feed-layout-preview__thumb {
  border-radius: 0.22rem;
}

html[data-knit-theme="dark"] .knit-mobile-layout-duo__preview[data-knit-author-meta="1"] .knit-feed-layout-preview__card,
html[data-knit-theme="dark"] .knit-mobile-layout-duo__preview[data-knit-author-meta="1"] .knit-feed-layout-preview__head,
html[data-knit-theme="dark"] .knit-mobile-layout-duo__preview[data-knit-author-meta="1"] .knit-feed-layout-preview__meta,
html[data-knit-theme="dark"] .knit-mobile-layout-duo__preview[data-knit-author-meta="1"] .knit-feed-layout-preview__footer {
  background: #2a2f3a;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__ava,
html[data-device="tablet"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__ava {
  width: 0.48rem;
  height: 0.48rem;
  margin-top: 0;
  flex-shrink: 0;
}

/* 昵称 / 简介仅灰色块，不显示文字 */
html[data-device="phone"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__nick,
html[data-device="phone"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__brief,
html[data-device="tablet"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__nick,
html[data-device="tablet"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__brief {
  font-size: 0;
  line-height: 0;
  color: transparent;
  overflow: hidden;
  text-indent: -999px;
  white-space: nowrap;
  border-radius: 0.1rem;
  background: color-mix(in srgb, var(--knit-text-muted, #9a9a9a) 42%, transparent);
  flex-shrink: 0;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__nick,
html[data-device="tablet"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__nick {
  width: 70%;
  height: 0.2rem;
}

html[data-device="phone"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__brief,
html[data-device="tablet"] .knit-mobile-layout-duo__preview .knit-feed-layout-preview__brief {
  width: 88%;
  height: 0.16rem;
  background: color-mix(in srgb, var(--knit-text-muted, #9a9a9a) 28%, transparent);
}

html[data-device="phone"] .knit-mobile-layout-sheet__hint--tight,
html[data-device="tablet"] .knit-mobile-layout-sheet__hint--tight {
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
}

html[data-device="phone"] .knit-mobile-layout-sheet__scroll,
html[data-device="tablet"] .knit-mobile-layout-sheet__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 0.95rem 0.35rem;
  touch-action: pan-y;
}

html[data-device="phone"] .knit-mobile-layout-sheet__hint,
html[data-device="tablet"] .knit-mobile-layout-sheet__hint {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  color: var(--knit-text-muted);
  line-height: 1.4;
}

html[data-device="phone"] .knit-mobile-layout-sheet__preview,
html[data-device="tablet"] .knit-mobile-layout-sheet__preview {
  margin: 0 0 0.75rem;
}

html[data-device="phone"] .knit-mobile-layout-sheet__preview .knit-feed-layout-preview__cap,
html[data-device="tablet"] .knit-mobile-layout-sheet__preview .knit-feed-layout-preview__cap {
  margin: 0 0 0.28rem;
  font-size: 0.7rem;
  font-weight: 650;
}

html[data-device="phone"] .knit-mobile-layout-sheet__preview .knit-feed-layout-preview__stage,
html[data-device="tablet"] .knit-mobile-layout-sheet__preview .knit-feed-layout-preview__stage {
  max-height: 7.2rem;
  padding: 0.38rem 0.36rem 0.4rem;
  border-radius: 0.65rem;
}

html[data-device="phone"] .knit-mobile-layout-sheet__preview .knit-feed-layout-preview__grid,
html[data-device="tablet"] .knit-mobile-layout-sheet__preview .knit-feed-layout-preview__grid {
  gap: 0.22rem;
}

html[data-device="phone"] .knit-mobile-layout-sheet__preview .knit-feed-layout-preview__card:nth-child(n + 5),
html[data-device="tablet"] .knit-mobile-layout-sheet__preview .knit-feed-layout-preview__card:nth-child(n + 5) {
  display: none;
}

html[data-device="phone"] .knit-mobile-layout-sheet__preview .knit-feed-layout-preview__meta,
html[data-device="tablet"] .knit-mobile-layout-sheet__preview .knit-feed-layout-preview__meta {
  gap: 0.18rem;
}

html[data-device="phone"] .knit-mobile-layout-sheet__preview .knit-feed-layout-preview__ava,
html[data-device="tablet"] .knit-mobile-layout-sheet__preview .knit-feed-layout-preview__ava {
  width: 0.72rem;
  height: 0.72rem;
}

html[data-device="phone"] .knit-mobile-layout-sheet__preview .knit-feed-layout-preview__nick,
html[data-device="phone"] .knit-mobile-layout-sheet__preview .knit-feed-layout-preview__brief,
html[data-device="tablet"] .knit-mobile-layout-sheet__preview .knit-feed-layout-preview__nick,
html[data-device="tablet"] .knit-mobile-layout-sheet__preview .knit-feed-layout-preview__brief {
  font-size: 0.52rem;
}

/* 手机/平板分类：全屏实色页，隐藏上下导航 */
html[data-device="phone"] .knit-home-category-bar:not(.is-collapsed) > .knit-home-category-bar__body,
html[data-device="tablet"] .knit-home-category-bar:not(.is-collapsed) > .knit-home-category-bar__body {
  inset: 0;
  top: 0 !important;
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none !important;
  z-index: 1600;
  border-radius: 0;
  border: 0;
  padding: 0;
  background: var(--knit-panel-bg, #fff);
  box-shadow: none;
  gap: 0;
}

html[data-device="phone"] .knit-home-category-bar__screen-head,
html[data-device="tablet"] .knit-home-category-bar__screen-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  padding: calc(0.35rem + env(safe-area-inset-top, 0px)) 0.75rem 0.45rem;
  border-bottom: 1px solid var(--knit-chrome-border, var(--knit-panel-border));
}

html[data-device="phone"] .knit-insp-filter__adv-done,
html[data-device="tablet"] .knit-insp-filter__adv-done {
  flex: 0 0 auto;
}

html[data-device="phone"] .knit-insp-filter__quick-pill,
html[data-device="tablet"] .knit-insp-filter__quick-pill {
  font-size: 0.8rem;
  padding: 0.36rem 0.78rem;
}

html[data-device="phone"] .knit-home-category-bar__screen-head h2,
html[data-device="tablet"] .knit-home-category-bar__screen-head h2 {
  margin: 0;
  flex: 1 1 auto;
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--knit-text-heading);
}

html[data-device="phone"] .knit-home-category-bar__back,
html[data-device="tablet"] .knit-home-category-bar__back {
  width: 2.15rem;
  height: 2.15rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.55rem;
  background: var(--knit-control-hover-bg, rgba(0, 0, 0, 0.06));
  color: var(--knit-text-heading);
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

html[data-device="phone"] .knit-home-category-bar__filters,
html[data-device="tablet"] .knit-home-category-bar__filters {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0.65rem max(0.75rem, env(safe-area-inset-right, 0px))
    calc(0.75rem + env(safe-area-inset-bottom, 0px)) max(0.75rem, env(safe-area-inset-left, 0px));
  touch-action: pan-x pan-y;
}

html[data-device="phone"] .knit-home-category-bar__backdrop,
html[data-device="tablet"] .knit-home-category-bar__backdrop {
  display: none !important;
}

html[data-device="phone"].knit-home-cat-float-open .knit-bottom-nav,
html[data-device="tablet"].knit-home-cat-float-open .knit-bottom-nav,
html[data-device="phone"] body.knit-mobile-layout-sheet-open .knit-bottom-nav,
html[data-device="tablet"] body.knit-mobile-layout-sheet-open .knit-bottom-nav,
html[data-device="phone"].knit-home-cat-float-open .knit-mobile-home-tabs,
html[data-device="tablet"].knit-home-cat-float-open .knit-mobile-home-tabs,
html[data-device="phone"] body.knit-mobile-layout-sheet-open .knit-mobile-home-tabs,
html[data-device="tablet"] body.knit-mobile-layout-sheet-open .knit-mobile-home-tabs {
  display: none !important;
}

html[data-device="phone"].knit-home-cat-float-open,
html[data-device="tablet"].knit-home-cat-float-open,
html[data-device="phone"] body.knit-mobile-layout-sheet-open,
html[data-device="tablet"] body.knit-mobile-layout-sheet-open {
  --knit-bottom-nav-h: 0px;
}

html[data-device="phone"] .knit-mobile-layout-sheet__group,
html[data-device="tablet"] .knit-mobile-layout-sheet__group {
  margin: 0 0 0.9rem;
}

html[data-device="phone"] .knit-mobile-layout-sheet__label,
html[data-device="tablet"] .knit-mobile-layout-sheet__label {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--knit-text-muted);
  letter-spacing: 0.02em;
}

html[data-device="phone"] .knit-mobile-layout-sheet__picks,
html[data-device="tablet"] .knit-mobile-layout-sheet__picks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

html[data-device="phone"] .knit-mobile-layout-sheet__picks--wide,
html[data-device="tablet"] .knit-mobile-layout-sheet__picks--wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-device="phone"] .knit-mobile-layout-sheet__pick,
html[data-device="tablet"] .knit-mobile-layout-sheet__pick {
  min-height: 2.35rem;
  margin: 0;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--knit-control-border);
  border-radius: 0.62rem;
  background: var(--knit-control-bg);
  color: var(--knit-text-body);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
}

html[data-device="phone"] .knit-mobile-layout-sheet__pick.is-active,
html[data-device="tablet"] .knit-mobile-layout-sheet__pick.is-active {
  border-color: var(--knit-chrome-active, #2563eb);
  box-shadow: 0 0 0 1px var(--knit-chrome-active, #2563eb);
  color: var(--knit-text-heading);
  background: color-mix(in srgb, var(--knit-chrome-active, #2563eb) 8%, var(--knit-control-bg));
}

html[data-device="phone"] .knit-mobile-layout-sheet__link,
html[data-device="tablet"] .knit-mobile-layout-sheet__link {
  display: flex;
  width: 100%;
  min-height: 2.45rem;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border: 1px dashed var(--knit-control-border);
  border-radius: 0.62rem;
  background: transparent;
  color: var(--knit-text-heading);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
}

/* 手机/平板：首页顶栏与底栏同一套滑块点击/拖拽 */
html[data-device="phone"] .knit-mobile-home-tabs.knit-seg-row,
html[data-device="tablet"] .knit-mobile-home-tabs.knit-seg-row,
html[data-device="phone"] .knit-msg-main-tabs.knit-seg-row,
html[data-device="tablet"] .knit-msg-main-tabs.knit-seg-row {
  position: relative;
  isolation: isolate;
  overflow: visible;
  touch-action: pan-x;
  user-select: none;
  -webkit-user-select: none;
}

html[data-device="phone"] .knit-mobile-home-tabs.knit-seg-row > .knit-seg-thumb,
html[data-device="tablet"] .knit-mobile-home-tabs.knit-seg-row > .knit-seg-thumb,
html[data-device="phone"] .knit-msg-main-tabs.knit-seg-row > .knit-seg-thumb,
html[data-device="tablet"] .knit-msg-main-tabs.knit-seg-row > .knit-seg-thumb {
  position: absolute !important;
  z-index: 0;
  left: 0 !important;
  top: 0 !important;
  right: auto !important;
  bottom: auto !important;
  width: var(--knit-seg-w, 0px);
  height: var(--knit-seg-h, 0px);
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  border-radius: 999px;
  background: var(--knit-chrome-active);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transform: translate3d(var(--knit-seg-x, 0px), var(--knit-seg-y, 0px), 0);
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.16s ease;
  will-change: transform;
  pointer-events: none;
  flex: none !important;
  min-width: 0 !important;
  max-width: none;
  align-self: start;
  overflow: hidden;
}

html[data-device="phone"] .knit-mobile-home-tabs.is-seg-dragging > .knit-seg-thumb,
html[data-device="tablet"] .knit-mobile-home-tabs.is-seg-dragging > .knit-seg-thumb,
html[data-device="phone"] .knit-msg-main-tabs.is-seg-dragging > .knit-seg-thumb,
html[data-device="tablet"] .knit-msg-main-tabs.is-seg-dragging > .knit-seg-thumb {
  transition: none;
}

html[data-device="phone"] .knit-mobile-home-tabs.is-seg-empty > .knit-seg-thumb,
html[data-device="tablet"] .knit-mobile-home-tabs.is-seg-empty > .knit-seg-thumb,
html[data-device="phone"] .knit-msg-main-tabs.is-seg-empty > .knit-seg-thumb,
html[data-device="tablet"] .knit-msg-main-tabs.is-seg-empty > .knit-seg-thumb {
  opacity: 0;
}

html[data-device="phone"] .knit-mobile-home-tabs.knit-seg-row > .knit-mobile-home-tab,
html[data-device="tablet"] .knit-mobile-home-tabs.knit-seg-row > .knit-mobile-home-tab,
html[data-device="phone"] .knit-msg-main-tabs.knit-seg-row > .knit-msg-main-tab,
html[data-device="tablet"] .knit-msg-main-tabs.knit-seg-row > .knit-msg-main-tab {
  z-index: 1;
  background: transparent;
}

html[data-device="phone"] .knit-mobile-home-tabs.knit-seg-row > .knit-mobile-home-tab.is-active,
html[data-device="phone"] .knit-mobile-home-tabs.knit-seg-row > .knit-mobile-home-tab:active,
html[data-device="phone"] .knit-mobile-home-tabs.knit-seg-row > .knit-mobile-home-tab.is-active:active,
html[data-device="tablet"] .knit-mobile-home-tabs.knit-seg-row > .knit-mobile-home-tab.is-active,
html[data-device="tablet"] .knit-mobile-home-tabs.knit-seg-row > .knit-mobile-home-tab:active,
html[data-device="tablet"] .knit-mobile-home-tabs.knit-seg-row > .knit-mobile-home-tab.is-active:active,
html[data-device="phone"] .knit-msg-main-tabs.knit-seg-row > .knit-msg-main-tab.is-active,
html[data-device="phone"] .knit-msg-main-tabs.knit-seg-row > .knit-msg-main-tab:active,
html[data-device="phone"] .knit-msg-main-tabs.knit-seg-row > .knit-msg-main-tab.is-active:active,
html[data-device="tablet"] .knit-msg-main-tabs.knit-seg-row > .knit-msg-main-tab.is-active,
html[data-device="tablet"] .knit-msg-main-tabs.knit-seg-row > .knit-msg-main-tab:active,
html[data-device="tablet"] .knit-msg-main-tabs.knit-seg-row > .knit-msg-main-tab.is-active:active {
  background: transparent;
}

html[data-device="phone"] .knit-mobile-home-tabs.knit-seg-row.is-seg-dragging > .knit-mobile-home-tab:active,
html[data-device="tablet"] .knit-mobile-home-tabs.knit-seg-row.is-seg-dragging > .knit-mobile-home-tab:active,
html[data-device="phone"] .knit-msg-main-tabs.knit-seg-row.is-seg-dragging > .knit-msg-main-tab:active,
html[data-device="tablet"] .knit-msg-main-tabs.knit-seg-row.is-seg-dragging > .knit-msg-main-tab:active {
  transform: none;
}

html[data-device="phone"] .knit-mobile-home-tabs.knit-seg-row > .knit-mobile-home-tab.is-seg-hot,
html[data-device="tablet"] .knit-mobile-home-tabs.knit-seg-row > .knit-mobile-home-tab.is-seg-hot,
html[data-device="phone"] .knit-msg-main-tabs.knit-seg-row > .knit-msg-main-tab.is-seg-hot,
html[data-device="tablet"] .knit-msg-main-tabs.knit-seg-row > .knit-msg-main-tab.is-seg-hot {
  color: var(--knit-chrome-active-text);
}

html[data-device="phone"] .knit-mobile-home-tabs.knit-seg-row.is-seg-dragging > .knit-mobile-home-tab.is-active:not(.is-seg-hot),
html[data-device="tablet"] .knit-mobile-home-tabs.knit-seg-row.is-seg-dragging > .knit-mobile-home-tab.is-active:not(.is-seg-hot),
html[data-device="phone"] .knit-msg-main-tabs.knit-seg-row.is-seg-dragging > .knit-msg-main-tab.is-active:not(.is-seg-hot),
html[data-device="tablet"] .knit-msg-main-tabs.knit-seg-row.is-seg-dragging > .knit-msg-main-tab.is-active:not(.is-seg-hot) {
  color: var(--knit-chrome-text-muted);
}

html[data-device="phone"] .knit-mobile-search-toggle,
html[data-device="tablet"] .knit-mobile-search-toggle {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--knit-chrome-text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

html[data-device="phone"] .knit-mobile-search-toggle:not([hidden]),
html[data-device="tablet"] .knit-mobile-search-toggle:not([hidden]) {
  display: inline-flex;
}

html[data-device="phone"] .knit-mobile-search-cancel,
html[data-device="tablet"] .knit-mobile-search-cancel {
  display: none;
  flex: 0 0 auto;
  margin: 0;
  padding: 0.35rem 0.15rem 0.35rem 0.45rem;
  border: 0;
  background: transparent;
  color: var(--knit-chrome-text);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

html[data-device="phone"] .knit-app.knit-app--mobile-home-tabs .knit-topbar,
html[data-device="tablet"] .knit-app.knit-app--mobile-home-tabs .knit-topbar {
  display: flex !important;
  gap: 0.35rem;
}

html[data-device="phone"] .knit-app.knit-app--mobile-home-tabs .knit-body,
html[data-device="tablet"] .knit-app.knit-app--mobile-home-tabs .knit-body {
  padding-top: 0 !important;
}

html[data-device="phone"] .knit-app.knit-app--mobile-home-tabs .knit-main,
html[data-device="tablet"] .knit-app.knit-app--mobile-home-tabs .knit-main {
  touch-action: pan-y;
}

html.knit-h-page-swipe .knit-app.knit-app--mobile-home-tabs .knit-main,
html.knit-h-page-swipe #knitHomeDeck,
html.knit-h-page-swipe #knitHomeDeck .knit-home-deck__page {
  touch-action: none !important;
}

html[data-device="phone"] .knit-app.knit-app--mobile-home-tabs .knit-follow-list,
html[data-device="tablet"] .knit-app.knit-app--mobile-home-tabs .knit-follow-list,
html[data-device="phone"] .knit-app.knit-app--mobile-home-tabs .knit-follow-sidebar,
html[data-device="tablet"] .knit-app.knit-app--mobile-home-tabs .knit-follow-sidebar {
  touch-action: pan-x;
}

html[data-device="phone"] .knit-channel-peek-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

html[data-device="phone"] .knit-channel-pager__slot .knit-grid-sleeve,
html[data-device="tablet"] .knit-channel-pager__slot .knit-grid-sleeve {
  min-width: 0;
  width: 100%;
}

html[data-device="phone"] .knit-grid.knit-grid--tab-enter,
html[data-device="tablet"] .knit-grid.knit-grid--tab-enter {
  animation: none;
}

html[data-device="phone"] .knit-app.knit-app--mobile-home-tabs .knit-topbar .knit-search-wrap,
html[data-device="tablet"] .knit-app.knit-app--mobile-home-tabs .knit-topbar .knit-search-wrap {
  display: none;
  flex: 1 1 auto;
  max-width: none;
  margin-left: 0;
}

html[data-device="phone"].knit-mobile-search-open .knit-mobile-notes-btn,
html[data-device="tablet"].knit-mobile-search-open .knit-mobile-notes-btn,
html[data-device="phone"].knit-mobile-search-open .knit-mobile-fav-float-btn,
html[data-device="tablet"].knit-mobile-search-open .knit-mobile-fav-float-btn,
html[data-device="phone"].knit-mobile-search-open .knit-mobile-home-tabs,
html[data-device="tablet"].knit-mobile-search-open .knit-mobile-home-tabs,
html[data-device="phone"].knit-mobile-search-open .knit-mobile-search-toggle,
html[data-device="tablet"].knit-mobile-search-open .knit-mobile-search-toggle {
  display: none !important;
}

html[data-device="phone"].knit-mobile-search-open .knit-mobile-search-cancel,
html[data-device="tablet"].knit-mobile-search-open .knit-mobile-search-cancel {
  display: inline-flex;
}

html[data-device="phone"].knit-mobile-search-open .knit-app.knit-app--mobile-home-tabs .knit-topbar .knit-search-wrap,
html[data-device="tablet"].knit-mobile-search-open .knit-app.knit-app--mobile-home-tabs .knit-topbar .knit-search-wrap {
  display: block;
}

html[data-device="phone"] .knit-app.knit-app--search .knit-topbar,
html[data-device="tablet"] .knit-app.knit-app--search .knit-topbar {
  display: flex !important;
  gap: 0.35rem;
}

html[data-device="phone"] .knit-app.knit-app--search .knit-body,
html[data-device="tablet"] .knit-app.knit-app--search .knit-body {
  padding-top: 0 !important;
}

html[data-device="phone"] .knit-app.knit-app--search .knit-topbar .knit-search-wrap,
html[data-device="tablet"] .knit-app.knit-app--search .knit-topbar .knit-search-wrap {
  display: block;
  flex: 1 1 auto;
  max-width: none;
  margin-left: 0;
}

html[data-device="phone"] .knit-app.knit-app--search .knit-mobile-home-tabs,
html[data-device="tablet"] .knit-app.knit-app--search .knit-mobile-home-tabs,
html[data-device="phone"] .knit-app.knit-app--search .knit-mobile-search-toggle,
html[data-device="tablet"] .knit-app.knit-app--search .knit-mobile-search-toggle,
html[data-device="phone"] .knit-app.knit-app--search .knit-mobile-notes-btn,
html[data-device="tablet"] .knit-app.knit-app--search .knit-mobile-notes-btn,
html[data-device="phone"] .knit-app.knit-app--search .knit-mobile-fav-float-btn,
html[data-device="tablet"] .knit-app.knit-app--search .knit-mobile-fav-float-btn {
  display: none !important;
}

html[data-device="phone"] .knit-app.knit-app--search .knit-mobile-search-cancel:not([hidden]),
html[data-device="tablet"] .knit-app.knit-app--search .knit-mobile-search-cancel:not([hidden]) {
  display: inline-flex;
}

html[data-device="phone"] .knit-app.knit-app--search,
html[data-device="tablet"] .knit-app.knit-app--search {
  --knit-bottom-nav-h: 0px;
}

html[data-device="phone"] .knit-app.knit-app--search .knit-bottom-nav,
html[data-device="tablet"] .knit-app.knit-app--search .knit-bottom-nav {
  display: none !important;
}

html[data-device="phone"] .knit-search-view,
html[data-device="tablet"] .knit-search-view {
  background: transparent;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: calc(var(--knit-top-overlay) + var(--knit-chrome-gap)) max(0.75rem, env(safe-area-inset-right, 0px)) calc(var(--knit-bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 0.85rem) max(0.75rem, env(safe-area-inset-left, 0px));
}

html[data-device="phone"] .knit-search-view--swipe-drag,
html[data-device="tablet"] .knit-search-view--swipe-drag {
  touch-action: none;
  will-change: transform, opacity;
}

html[data-device="phone"] .knit-search-view-head,
html[data-device="tablet"] .knit-search-view-head {
  display: none;
}

html[data-device="phone"] .knit-home-back-to-top,
html[data-device="tablet"] .knit-home-back-to-top {
  width: 2.85rem;
  height: 2.85rem;
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  bottom: calc(var(--knit-bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 0.7rem);
  font-size: 1.2rem;
}

html[data-device="phone"] .knit-bottom-nav__btn[hidden],
html[data-device="tablet"] .knit-bottom-nav__btn[hidden],
html[data-device="phone"]:not(.knit-can-stock-manage) #knitBottomStockManage,
html[data-device="tablet"]:not(.knit-can-stock-manage) #knitBottomStockManage,
html[data-device="phone"]:not(.knit-can-stock-manage) #knitMobileMoreStockManage,
html[data-device="tablet"]:not(.knit-can-stock-manage) #knitMobileMoreStockManage {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  min-height: 0 !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  flex: 0 0 0 !important;
}

html[data-device="phone"] .knit-bottom-nav,
html[data-device="tablet"] .knit-bottom-nav {
  display: flex;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1500;
  box-sizing: border-box;
  height: calc(var(--knit-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  padding: 0.18rem env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: transparent;
  border-top: 0;
  border-radius: 0;
  box-shadow: none;
  align-items: center;
  justify-content: space-around;
  gap: 0;
  overflow: visible;
  clip-path: none;
  -webkit-clip-path: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html[data-device="phone"] .knit-bottom-nav::before,
html[data-device="tablet"] .knit-bottom-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-top-left-radius: var(--knit-chrome-radius);
  border-top-right-radius: var(--knit-chrome-radius);
  background: color-mix(in srgb, var(--knit-chrome-bg) 88%, transparent);
  box-shadow: 0 -4px 18px var(--knit-chrome-shadow);
  -webkit-backdrop-filter: saturate(1.15) blur(18px);
  backdrop-filter: saturate(1.15) blur(18px);
  transform: translateZ(0);
  pointer-events: none;
}

html[data-device="phone"] .knit-bottom-nav > *,
html[data-device="tablet"] .knit-bottom-nav > * {
  position: relative;
  z-index: 1;
}

/* 手机/平板底栏：按住横向拖拽切换（滑块用真实节点，避免盖住磨砂 ::before）
 * 选择器必须比 html[data-device=tablet] .knit-seg-row 更具体，避免底栏被改成 relative。 */
html[data-device="phone"] .knit-bottom-nav.knit-seg-row,
html[data-device="tablet"] .knit-bottom-nav.knit-seg-row {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  touch-action: pan-x;
  user-select: none;
  -webkit-user-select: none;
}

html[data-device="phone"] .knit-bottom-nav > .knit-seg-thumb,
html[data-device="tablet"] .knit-bottom-nav > .knit-seg-thumb {
  position: absolute;
  z-index: 0;
  left: 0;
  top: 0;
  width: var(--knit-seg-w, 0px);
  height: var(--knit-seg-h, 0px);
  border-radius: 999px;
  background: var(--knit-chrome-active);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transform: translate3d(var(--knit-seg-x, 0px), var(--knit-seg-y, 0px), 0);
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.16s ease;
  will-change: transform;
  pointer-events: none;
  flex: 0 0 auto;
}

html[data-device="phone"] .knit-bottom-nav.is-seg-dragging > .knit-seg-thumb,
html[data-device="tablet"] .knit-bottom-nav.is-seg-dragging > .knit-seg-thumb {
  transition: none;
}

html[data-device="phone"] .knit-bottom-nav.is-seg-empty > .knit-seg-thumb,
html[data-device="tablet"] .knit-bottom-nav.is-seg-empty > .knit-seg-thumb {
  opacity: 0;
}

html[data-device="phone"] .knit-bottom-nav.knit-seg-row > .knit-bottom-nav__btn.is-active,
html[data-device="phone"] .knit-bottom-nav.knit-seg-row > .knit-bottom-nav__btn:active,
html[data-device="phone"] .knit-bottom-nav.knit-seg-row > .knit-bottom-nav__btn.is-active:active,
html[data-device="tablet"] .knit-bottom-nav.knit-seg-row > .knit-bottom-nav__btn.is-active,
html[data-device="tablet"] .knit-bottom-nav.knit-seg-row > .knit-bottom-nav__btn:active,
html[data-device="tablet"] .knit-bottom-nav.knit-seg-row > .knit-bottom-nav__btn.is-active:active {
  background: transparent;
  filter: none;
}

html[data-device="phone"] .knit-bottom-nav.knit-seg-row.is-seg-dragging > .knit-bottom-nav__btn:active,
html[data-device="tablet"] .knit-bottom-nav.knit-seg-row.is-seg-dragging > .knit-bottom-nav__btn:active {
  transform: none;
}

html[data-device="phone"] .knit-bottom-nav.knit-seg-row > .knit-bottom-nav__btn.is-seg-hot,
html[data-device="tablet"] .knit-bottom-nav.knit-seg-row > .knit-bottom-nav__btn.is-seg-hot {
  color: var(--knit-chrome-active-text);
}

html[data-device="phone"] .knit-bottom-nav.knit-seg-row.is-seg-dragging > .knit-bottom-nav__btn.is-active:not(.is-seg-hot),
html[data-device="tablet"] .knit-bottom-nav.knit-seg-row.is-seg-dragging > .knit-bottom-nav__btn.is-active:not(.is-seg-hot) {
  color: var(--knit-chrome-text-muted);
}

html[data-device="phone"] .knit-mobile-more,
html[data-device="tablet"] .knit-mobile-more {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 1650;
  background: transparent;
}

html[data-device="phone"] .knit-mobile-more-backdrop,
html[data-device="tablet"] .knit-mobile-more-backdrop {
  z-index: 0;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

html[data-device="phone"] body.knit-mobile-more-open .knit-mobile-more-backdrop,
html[data-device="tablet"] body.knit-mobile-more-open .knit-mobile-more-backdrop {
  opacity: 1;
  pointer-events: auto;
}

html[data-device="phone"] .knit-mobile-more-panel,
html[data-device="tablet"] .knit-mobile-more-panel {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 100%;
  max-height: none;
  height: 100%;
  border-radius: 0;
  border: none;
  box-shadow: none;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  padding: calc(0.75rem + env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) calc(1.15rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  transform: translate3d(100%, 0, 0);
  transition: transform 0.44s cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-device="phone"] body.knit-mobile-more-open .knit-mobile-more-panel,
html[data-device="tablet"] body.knit-mobile-more-open .knit-mobile-more-panel {
  transform: translate3d(0, 0, 0);
}

html[data-device="phone"] .knit-mobile-more.knit-page--swipe-drag .knit-mobile-more-panel,
html[data-device="tablet"] .knit-mobile-more.knit-page--swipe-drag .knit-mobile-more-panel,
html[data-device="phone"] .knit-mobile-more.knit-page--swipe-drag .knit-mobile-more-backdrop,
html[data-device="tablet"] .knit-mobile-more.knit-page--swipe-drag .knit-mobile-more-backdrop {
  transition: none;
}

html[data-device="phone"] .knit-mobile-more.knit-page--swipe-drag,
html[data-device="tablet"] .knit-mobile-more.knit-page--swipe-drag,
html[data-device="phone"] .knit-mobile-more.knit-page--swipe-anim,
html[data-device="tablet"] .knit-mobile-more.knit-page--swipe-anim {
  touch-action: none;
}

html[data-device="phone"] .knit-mobile-more.knit-page--swipe-drag .knit-mobile-more-panel,
html[data-device="tablet"] .knit-mobile-more.knit-page--swipe-drag .knit-mobile-more-panel {
  will-change: transform;
}

html.knit-h-page-swipe .knit-mobile-more-grid button,
html.knit-h-page-swipe .knit-mobile-more-logout {
  pointer-events: none;
}

html[data-device="phone"] .knit-mobile-more-grid,
html[data-device="tablet"] .knit-mobile-more-grid {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  gap: 0.5rem;
}

html[data-device="phone"] .knit-mobile-more-grid button,
html[data-device="tablet"] .knit-mobile-more-grid button {
  display: flex;
  width: 100%;
  min-height: 3.15rem;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.9rem 1rem;
  font-size: 0.98rem;
  touch-action: pan-y;
}

html[data-device="phone"] .knit-mobile-more-logout,
html[data-device="tablet"] .knit-mobile-more-logout {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.15rem;
  margin-top: auto;
  padding: 0.9rem 1rem;
  font-size: 0.98rem;
  text-align: center;
  touch-action: pan-y;
}

html[data-device="phone"] .knit-mobile-more-logout[hidden],
html[data-device="tablet"] .knit-mobile-more-logout[hidden] {
  display: none !important;
}

/* 手机/平板：隐藏侧栏，主区全宽，底栏占位 */
html[data-device="phone"] .knit-sidebar,
html[data-device="tablet"] .knit-sidebar {
  display: none !important;
}

html[data-device="phone"] .knit-main,
html[data-device="tablet"] .knit-main,
html[data-device="phone"][data-knit-sidebar-ui="fixed"] .knit-main,
html[data-device="tablet"][data-knit-sidebar-ui="fixed"] .knit-main,
html[data-device="phone"][data-knit-sidebar-ui="hover"] .knit-main,
html[data-device="tablet"][data-knit-sidebar-ui="hover"] .knit-main {
  margin-left: 0 !important;
  width: 100% !important;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  background: transparent;
}

/* 顶栏在触控设备始终可见，不依赖 hover */
html[data-device="phone"] .knit-topbar,
html[data-device="tablet"] .knit-topbar {
  background: transparent;
  border-bottom-color: transparent;
  border-radius: 0;
  box-shadow: none;
  height: var(--knit-top-overlay);
  padding-left: max(0.5rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.5rem, env(safe-area-inset-right, 0px));
  gap: 0.55rem;
  overflow: visible;
  clip-path: none;
  -webkit-clip-path: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html[data-device="phone"] .knit-topbar::before,
html[data-device="tablet"] .knit-topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-bottom-left-radius: var(--knit-chrome-radius);
  border-bottom-right-radius: var(--knit-chrome-radius);
  background: color-mix(in srgb, var(--knit-chrome-bg) 88%, transparent);
  box-shadow: 0 2px 12px var(--knit-chrome-shadow);
  -webkit-backdrop-filter: saturate(1.15) blur(18px);
  backdrop-filter: saturate(1.15) blur(18px);
  transform: translateZ(0);
  pointer-events: none;
}

html[data-device="phone"] .knit-topbar > *,
html[data-device="tablet"] .knit-topbar > * {
  position: relative;
  z-index: 1;
}

html[data-device="phone"] .knit-topbar .knit-brand,
html[data-device="phone"] .knit-topbar .knit-search-wrap,
html[data-device="tablet"] .knit-topbar .knit-brand,
html[data-device="tablet"] .knit-topbar .knit-search-wrap {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

html[data-device="phone"] .knit-brand,
html[data-device="tablet"] .knit-brand {
  display: none;
}

html[data-device="phone"] .knit-search-wrap,
html[data-device="tablet"] .knit-search-wrap {
  max-width: none;
  margin-left: 0;
  flex: 1 1 auto;
}

html[data-device="phone"] .knit-search,
html[data-device="tablet"] .knit-search {
  font-size: 0.88rem;
  min-height: 2.1rem;
}

html[data-device="phone"] .knit-body,
html[data-device="tablet"] .knit-body {
  display: flex;
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding-top: 0;
  background: transparent;
}

html[data-device="phone"] .knit-app.knit-app--follow .knit-body,
html[data-device="tablet"] .knit-app.knit-app--follow .knit-body {
  padding-top: 0;
}

/* 手机/平板已用 body padding 给顶栏留位，勿再给主区加桌面那套 margin-top。
   高度必须有上限，否则 #knitScrollport 会跟着内容撑开，只能下拉刷新、无法上滑。 */
html[data-device="phone"][data-knit-topbar-ui="fixed"] .knit-app:not(.knit-app--follow) .knit-main,
html[data-device="tablet"][data-knit-topbar-ui="fixed"] .knit-app:not(.knit-app--follow) .knit-main {
  margin-top: 0 !important;
  flex: 1 1 0%;
  min-height: 0;
  height: auto;
  max-height: 100%;
}

html[data-device="phone"] .knit-main,
html[data-device="tablet"] .knit-main {
  padding-top: 0;
}

/* 分类栏行避开固定顶栏；显示时网格不再重复顶栏留白，避免叠层与过大空隙 */
html[data-device="phone"] .knit-home-category-bar:not([hidden]),
html[data-device="tablet"] .knit-home-category-bar:not([hidden]) {
  z-index: 4;
}

html[data-device="phone"] .knit-home-category-bar.is-scroll-pushed,
html[data-device="tablet"] .knit-home-category-bar.is-scroll-pushed {
  /* 行级 is-scroll-pushed 统一处理，避免双重位移 */
}

html.knit-home-cat-bar-on[data-device="phone"] .knit-grid-sleeve,
html.knit-home-cat-bar-on[data-device="tablet"] .knit-grid-sleeve,
html.knit-home-cat-bar-on[data-device="phone"] .knit-home-deck__page,
html.knit-home-cat-bar-on[data-device="tablet"] .knit-home-deck__page {
  padding-top: 0.35rem;
}

/* 网格：取消强制设计宽，允许随屏宽重排 */
html[data-device="phone"] .knit-grid-sleeve,
html[data-device="tablet"] .knit-grid-sleeve,
html[data-device="phone"] .knit-grid,
html[data-device="tablet"] .knit-grid {
  min-width: 0 !important;
  width: 100% !important;
}

html[data-device="phone"] .knit-grid-sleeve,
html[data-device="tablet"] .knit-grid-sleeve {
  padding-top: calc(var(--knit-top-overlay) + var(--knit-chrome-gap));
  padding-bottom: calc(
    var(--knit-bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 0.65rem
  );
  padding-left: max(var(--knit-page-pad-x), env(safe-area-inset-left, 0px));
  padding-right: max(var(--knit-page-pad-x), env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}

html[data-device="phone"] .knit-scrollport,
html[data-device="tablet"] .knit-scrollport {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

html[data-device="phone"] #knitFavoriteView .knit-favorite-list::after,
html[data-device="tablet"] #knitFavoriteView .knit-favorite-list::after {
  content: "";
  display: block;
  grid-column: 1 / -1;
  height: calc(var(--knit-bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 0.5rem);
  pointer-events: none;
}

html[data-device="phone"] .knit-main,
html[data-device="tablet"] .knit-main {
  background: transparent;
}

html[data-device="phone"] .knit-home-grid-head,
html[data-device="tablet"] .knit-home-grid-head {
  padding: 0.45rem 0.55rem;
}

html[data-device="phone"] .knit-pattern-meta,
html[data-device="tablet"] .knit-pattern-meta {
  font-size: 0.72rem;
}

/* 关注页：上下堆叠 */
html[data-device="phone"] .knit-follow-layout,
html[data-device="tablet"] .knit-follow-layout,
html[data-device="phone"] #knitFollowView .knit-follow-layout,
html[data-device="tablet"] #knitFollowView .knit-follow-layout {
  display: flex;
  flex-direction: column;
  min-height: min-content;
  overflow: visible;
  align-items: stretch;
  width: 100%;
}

html[data-device="phone"] #knitFollowView .knit-follow-head,
html[data-device="tablet"] #knitFollowView .knit-follow-head,
html[data-device="phone"] #knitFollowView .knit-follow-works-head,
html[data-device="tablet"] #knitFollowView .knit-follow-works-head,
html[data-device="phone"] #knitFavoriteView .knit-follow-head,
html[data-device="tablet"] #knitFavoriteView .knit-follow-head {
  display: none !important;
}

html[data-device="phone"] .knit-page-channel-switch,
html[data-device="tablet"] .knit-page-channel-switch {
  margin: 0.35rem 0.55rem 0.4rem;
}

html[data-device="phone"] #knitFollowView .knit-page-channel-switch,
html[data-device="tablet"] #knitFollowView .knit-page-channel-switch {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  align-self: stretch;
  width: auto;
  max-width: none;
  box-sizing: border-box;
  margin: 0.15rem 0.55rem 0.5rem;
}

html[data-device="phone"] .knit-page-channel-switch.knit-seg-row,
html[data-device="tablet"] .knit-page-channel-switch.knit-seg-row {
  isolation: isolate;
  overflow: hidden;
  touch-action: pan-x;
  user-select: none;
  -webkit-user-select: none;
}

html[data-device="phone"] .knit-page-channel-switch.knit-seg-row > .knit-seg-thumb,
html[data-device="tablet"] .knit-page-channel-switch.knit-seg-row > .knit-seg-thumb {
  position: absolute;
  z-index: 0;
  left: 0;
  top: 0;
  width: var(--knit-seg-w, 0px);
  height: var(--knit-seg-h, 0px);
  margin: 0;
  border-radius: 8px;
  background: var(--knit-panel-bg, #fff);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  transform: translate3d(var(--knit-seg-x, 0px), var(--knit-seg-y, 0px), 0);
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.16s ease;
  will-change: transform;
  pointer-events: none;
  flex: 0 0 auto;
}

html[data-knit-theme="dark"][data-device="phone"] .knit-page-channel-switch.knit-seg-row > .knit-seg-thumb,
html[data-knit-theme="dark"][data-device="tablet"] .knit-page-channel-switch.knit-seg-row > .knit-seg-thumb {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

html[data-device="phone"] .knit-page-channel-switch.is-seg-dragging > .knit-seg-thumb,
html[data-device="tablet"] .knit-page-channel-switch.is-seg-dragging > .knit-seg-thumb {
  transition: none;
}

html[data-device="phone"] .knit-page-channel-switch.is-seg-empty > .knit-seg-thumb,
html[data-device="tablet"] .knit-page-channel-switch.is-seg-empty > .knit-seg-thumb {
  opacity: 0;
}

html[data-device="phone"] .knit-page-channel-switch.knit-seg-row > .knit-mine-channel-tab,
html[data-device="tablet"] .knit-page-channel-switch.knit-seg-row > .knit-mine-channel-tab,
html[data-device="phone"] .knit-page-channel-switch.knit-seg-row > .knit-mine-channel-tab.is-active,
html[data-device="tablet"] .knit-page-channel-switch.knit-seg-row > .knit-mine-channel-tab.is-active {
  position: relative;
  z-index: 1;
  background: transparent;
  box-shadow: none;
}

html[data-device="phone"] .knit-page-channel-switch.knit-seg-row.is-seg-dragging > .knit-mine-channel-tab:active,
html[data-device="tablet"] .knit-page-channel-switch.knit-seg-row.is-seg-dragging > .knit-mine-channel-tab:active {
  transform: none;
}

html[data-device="phone"] .knit-follow-sidebar,
html[data-device="tablet"] .knit-follow-sidebar {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  width: 100%;
  max-height: none;
  border-right: none;
  border-bottom: 1px solid var(--knit-panel-border);
}

html[data-device="phone"] .knit-follow-list,
html[data-device="tablet"] .knit-follow-list,
html[data-device="phone"] #knitFollowView .knit-follow-list,
html[data-device="tablet"] #knitFollowView .knit-follow-list {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: visible;
  gap: 0.55rem;
  padding: 0.62rem max(0.55rem, env(safe-area-inset-right, 0px)) 0.55rem max(0.55rem, env(safe-area-inset-left, 0px));
  -webkit-overflow-scrolling: touch;
}

html[data-device="phone"] .knit-follow-card,
html[data-device="tablet"] .knit-follow-card,
html[data-device="phone"] .knit-follow-card--all,
html[data-device="tablet"] .knit-follow-card--all {
  width: 3.55rem;
  min-width: 3.55rem;
  max-width: 3.55rem;
  padding: 0.12rem 0.05rem 0.2rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  align-items: center;
  gap: 0.22rem;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible;
}

html[data-device="phone"] .knit-follow-card-dot,
html[data-device="tablet"] .knit-follow-card-dot {
  top: 0.08rem;
  right: 0.12rem;
  width: 0.46rem;
  height: 0.46rem;
  box-shadow: 0 0 0 1.5px var(--knit-bg, #fff);
}

html[data-device="phone"] .knit-follow-card:hover,
html[data-device="tablet"] .knit-follow-card:hover,
html[data-device="phone"] .knit-follow-card.is-active,
html[data-device="tablet"] .knit-follow-card.is-active,
html[data-device="phone"] .knit-follow-card:focus-within,
html[data-device="tablet"] .knit-follow-card:focus-within {
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: none;
}

html[data-device="phone"] .knit-follow-card-main,
html[data-device="tablet"] .knit-follow-card-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
}

html[data-device="phone"] .knit-follow-chip-avatar,
html[data-device="tablet"] .knit-follow-chip-avatar {
  display: block;
}

html[data-device="phone"] .knit-follow-card.is-active .knit-follow-chip-avatar,
html[data-device="tablet"] .knit-follow-card.is-active .knit-follow-chip-avatar {
  box-shadow: 0 0 0 2px var(--knit-red, #c93030);
}

html[data-device="phone"] .knit-follow-name,
html[data-device="tablet"] .knit-follow-name {
  width: 100%;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-device="phone"] .knit-follow-id,
html[data-device="tablet"] .knit-follow-id,
html[data-device="phone"] .knit-follow-note,
html[data-device="tablet"] .knit-follow-note,
html[data-device="phone"] .knit-follow-card[data-user-id] .knit-follow-id::after,
html[data-device="tablet"] .knit-follow-card[data-user-id] .knit-follow-id::after {
  display: none !important;
}

html[data-device="phone"] .knit-follow-main,
html[data-device="tablet"] .knit-follow-main,
html[data-device="phone"] #knitFollowView .knit-follow-main,
html[data-device="tablet"] #knitFollowView .knit-follow-main {
  min-height: auto;
  flex: 0 0 auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--knit-main-bg);
}

html[data-device="phone"] #knitFollowView .knit-follow-scroll,
html[data-device="tablet"] #knitFollowView .knit-follow-scroll,
html[data-device="phone"] #knitFollowView .knit-scrollport.knit-follow-scroll,
html[data-device="tablet"] #knitFollowView .knit-scrollport.knit-follow-scroll {
  flex: 0 0 auto;
  min-height: auto;
  height: auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible !important;
  touch-action: pan-y;
}

html[data-device="phone"] .knit-follow-view,
html[data-device="tablet"] .knit-follow-view,
html[data-device="phone"] #knitFollowView,
html[data-device="tablet"] #knitFollowView {
  background: var(--knit-main-bg);
  padding-top: calc(var(--knit-top-overlay) + var(--knit-chrome-gap));
}

html[data-device="phone"] #knitFollowView,
html[data-device="tablet"] #knitFollowView,
html[data-device="phone"] #knitFollowView .knit-follow-layout,
html[data-device="tablet"] #knitFollowView .knit-follow-layout,
html[data-device="phone"] #knitFollowView .knit-follow-sidebar,
html[data-device="tablet"] #knitFollowView .knit-follow-sidebar,
html[data-device="phone"] #knitFollowView .knit-follow-main,
html[data-device="tablet"] #knitFollowView .knit-follow-main,
html[data-device="phone"] #knitFollowView .knit-scrollport,
html[data-device="tablet"] #knitFollowView .knit-scrollport,
html[data-device="phone"] #knitFollowView .knit-channel-pager,
html[data-device="tablet"] #knitFollowView .knit-channel-pager,
html[data-device="phone"] #knitFollowView .knit-channel-pager__pane,
html[data-device="tablet"] #knitFollowView .knit-channel-pager__pane,
html[data-device="phone"] #knitFollowView .knit-channel-pager__slot,
html[data-device="tablet"] #knitFollowView .knit-channel-pager__slot,
html[data-device="phone"] #knitFollowView .knit-follow-works-list,
html[data-device="tablet"] #knitFollowView .knit-follow-works-list,
html[data-device="phone"] #knitFollowView .knit-user-profile-empty,
html[data-device="tablet"] #knitFollowView .knit-user-profile-empty {
  background: var(--knit-main-bg) !important;
}

html[data-device="phone"] #knitFollowView,
html[data-device="tablet"] #knitFollowView,
html[data-device="phone"] #knitFollowView .knit-scrollport,
html[data-device="tablet"] #knitFollowView .knit-scrollport,
html[data-device="phone"] #knitFollowView .knit-follow-main,
html[data-device="tablet"] #knitFollowView .knit-follow-main {
  background: var(--knit-page-bg) !important;
}

html[data-device="phone"] .knit-follow-works-list,
html[data-device="tablet"] .knit-follow-works-list {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-top: 0.55rem;
  padding-bottom: calc(var(--knit-bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 0.85rem);
  padding-left: max(0.45rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.45rem, env(safe-area-inset-right, 0px));
}

html[data-device="phone"] .knit-follow-works-list > .knit-user-profile-empty,
html[data-device="tablet"] .knit-follow-works-list > .knit-user-profile-empty,
html[data-device="phone"] .knit-channel-pager__slot .knit-user-profile-empty,
html[data-device="tablet"] .knit-channel-pager__slot .knit-user-profile-empty,
html[data-device="phone"] .knit-channel-pager__slot .knit-home-empty,
html[data-device="tablet"] .knit-channel-pager__slot .knit-home-empty {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 1.5rem 0;
  box-sizing: border-box;
  writing-mode: horizontal-tb;
  word-break: keep-all;
}

html[data-device="phone"] #knitFollowChannelSwitch .knit-mine-channel-tab,
html[data-device="tablet"] #knitFollowChannelSwitch .knit-mine-channel-tab {
  min-height: 2.15rem;
  padding: 0.32rem 0.2rem;
  font-size: 0.84rem;
}

html[data-device="phone"] .knit-follow-sidebar,
html[data-device="tablet"] .knit-follow-sidebar {
  background: transparent;
}

html[data-device="phone"] .knit-mine-view,
html[data-device="tablet"] .knit-mine-view,
html[data-device="phone"] .knit-notes-view,
html[data-device="tablet"] .knit-notes-view,
html[data-device="phone"] .knit-admin-view,
html[data-device="tablet"] .knit-admin-view,
html[data-device="phone"] .knit-creator-view,
html[data-device="tablet"] .knit-creator-view {
  padding-top: calc(var(--knit-top-overlay) + var(--knit-chrome-gap));
}

html[data-device="phone"] .knit-admin-view,
html[data-device="tablet"] .knit-admin-view {
  touch-action: pan-y;
  overscroll-behavior-x: none;
}

html[data-device="phone"] .knit-admin-view.knit-page--swipe-drag,
html[data-device="tablet"] .knit-admin-view.knit-page--swipe-drag,
html[data-device="phone"] .knit-admin-view.knit-page--swipe-anim,
html[data-device="tablet"] .knit-admin-view.knit-page--swipe-anim {
  touch-action: none;
  overflow: hidden;
  will-change: transform;
}

html[data-device="phone"] .knit-admin-view.knit-page--swipe-drag,
html[data-device="tablet"] .knit-admin-view.knit-page--swipe-drag {
  transition: none;
}

html[data-device="phone"] .knit-admin-view.knit-page--swipe-anim,
html[data-device="tablet"] .knit-admin-view.knit-page--swipe-anim {
  transition: transform 0.44s cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-device="phone"] .knit-admin-view.knit-page--swipe-over-more,
html[data-device="tablet"] .knit-admin-view.knit-page--swipe-over-more {
  position: fixed;
  inset: 0;
  z-index: 1660;
  background: var(--knit-page-bg);
  box-shadow: -12px 0 28px rgba(15, 23, 42, 0.12);
}

html[data-device="phone"] #knitMineEnterpriseModal.knit-page--swipe-drag .knit-mine-enterprise-panel,
html[data-device="tablet"] #knitMineEnterpriseModal.knit-page--swipe-drag .knit-mine-enterprise-panel {
  transition: none;
}

html[data-device="phone"] #knitMineEnterpriseModal.knit-page--swipe-drag,
html[data-device="tablet"] #knitMineEnterpriseModal.knit-page--swipe-drag {
  touch-action: none;
}

html[data-device="phone"] #knitMineView,
html[data-device="tablet"] #knitMineView,
html[data-device="phone"] .knit-app.knit-app--hide-topbar .knit-admin-view,
html[data-device="tablet"] .knit-app.knit-app--hide-topbar .knit-admin-view,
html[data-device="phone"] .knit-app.knit-app--hide-topbar #knitProductivityConvertView,
html[data-device="tablet"] .knit-app.knit-app--hide-topbar #knitProductivityConvertView,
html[data-device="phone"] .knit-app.knit-app--hide-topbar #knitProductivityCraftView,
html[data-device="tablet"] .knit-app.knit-app--hide-topbar #knitProductivityCraftView,
html[data-device="phone"] .knit-app.knit-app--hide-topbar #knitProductivityFactoryView,
html[data-device="tablet"] .knit-app.knit-app--hide-topbar #knitProductivityFactoryView {
  padding-top: env(safe-area-inset-top, 0px);
}

html[data-device="phone"] .knit-follow-work-main,
html[data-device="tablet"] .knit-follow-work-main {
  flex-direction: column;
  align-items: stretch;
}

html[data-device="phone"] .knit-follow-work-left,
html[data-device="tablet"] .knit-follow-work-left {
  width: 100%;
  min-width: 0;
}

html[data-device="phone"] .knit-follow-work-intro,
html[data-device="tablet"] .knit-follow-work-intro {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: none;
  overflow: visible;
  -webkit-line-clamp: unset;
}

html[data-device="phone"] .knit-app:has(#knitMessagesView:not([hidden])) .knit-topbar,
html[data-device="tablet"] .knit-app:has(#knitMessagesView:not([hidden])) .knit-topbar,
html[data-device="phone"] .knit-app:has(#knitMessagesView:not([hidden])) .knit-search-wrap,
html[data-device="tablet"] .knit-app:has(#knitMessagesView:not([hidden])) .knit-search-wrap,
html[data-device="phone"] .knit-app:has(#knitMineView:not([hidden])) .knit-topbar,
html[data-device="tablet"] .knit-app:has(#knitMineView:not([hidden])) .knit-topbar,
html[data-device="phone"] .knit-app:has(#knitMineView:not([hidden])) .knit-search-wrap,
html[data-device="tablet"] .knit-app:has(#knitMineView:not([hidden])) .knit-search-wrap,
html[data-device="phone"] .knit-app:has(#knitFavoriteView:not([hidden])) .knit-topbar,
html[data-device="tablet"] .knit-app:has(#knitFavoriteView:not([hidden])) .knit-topbar,
html[data-device="phone"] .knit-app:has(#knitFavoriteView:not([hidden])) .knit-search-wrap,
html[data-device="tablet"] .knit-app:has(#knitFavoriteView:not([hidden])) .knit-search-wrap,
html[data-device="phone"] .knit-app:has(#knitDeveloperView:not([hidden])) .knit-topbar,
html[data-device="tablet"] .knit-app:has(#knitDeveloperView:not([hidden])) .knit-topbar,
html[data-device="phone"] .knit-app:has(#knitDeveloperView:not([hidden])) .knit-search-wrap,
html[data-device="tablet"] .knit-app:has(#knitDeveloperView:not([hidden])) .knit-search-wrap,
html[data-device="phone"] .knit-app:has(#knitCreatorView:not([hidden])) .knit-topbar,
html[data-device="tablet"] .knit-app:has(#knitCreatorView:not([hidden])) .knit-topbar,
html[data-device="phone"] .knit-app:has(#knitCreatorView:not([hidden])) .knit-search-wrap,
html[data-device="tablet"] .knit-app:has(#knitCreatorView:not([hidden])) .knit-search-wrap,
html[data-device="phone"] .knit-app:has(#knitNotesView:not([hidden])) .knit-topbar,
html[data-device="tablet"] .knit-app:has(#knitNotesView:not([hidden])) .knit-topbar,
html[data-device="phone"] .knit-app:has(#knitNotesView:not([hidden])) .knit-search-wrap,
html[data-device="tablet"] .knit-app:has(#knitNotesView:not([hidden])) .knit-search-wrap,
html[data-device="phone"] .knit-app:has(#knitAdminView:not([hidden])) .knit-topbar,
html[data-device="tablet"] .knit-app:has(#knitAdminView:not([hidden])) .knit-topbar,
html[data-device="phone"] .knit-app:has(#knitAdminView:not([hidden])) .knit-search-wrap,
html[data-device="tablet"] .knit-app:has(#knitAdminView:not([hidden])) .knit-search-wrap,
html[data-device="phone"] .knit-app:has(#knitAboutView:not([hidden])) .knit-topbar,
html[data-device="tablet"] .knit-app:has(#knitAboutView:not([hidden])) .knit-topbar,
html[data-device="phone"] .knit-app:has(#knitAboutView:not([hidden])) .knit-search-wrap,
html[data-device="tablet"] .knit-app:has(#knitAboutView:not([hidden])) .knit-search-wrap,
html[data-device="phone"] .knit-app:has(#knitDataView:not([hidden])) .knit-topbar,
html[data-device="tablet"] .knit-app:has(#knitDataView:not([hidden])) .knit-topbar,
html[data-device="phone"] .knit-app:has(#knitDataView:not([hidden])) .knit-search-wrap,
html[data-device="tablet"] .knit-app:has(#knitDataView:not([hidden])) .knit-search-wrap,
html[data-device="phone"] .knit-app:has(#knitTempCoverView:not([hidden])) .knit-topbar,
html[data-device="tablet"] .knit-app:has(#knitTempCoverView:not([hidden])) .knit-topbar,
html[data-device="phone"] .knit-app:has(#knitTempCoverView:not([hidden])) .knit-search-wrap,
html[data-device="tablet"] .knit-app:has(#knitTempCoverView:not([hidden])) .knit-search-wrap,
html[data-device="phone"] .knit-app:has(#knitProductivityConvertView:not([hidden])) .knit-topbar,
html[data-device="tablet"] .knit-app:has(#knitProductivityConvertView:not([hidden])) .knit-topbar,
html[data-device="phone"] .knit-app:has(#knitProductivityConvertView:not([hidden])) .knit-search-wrap,
html[data-device="tablet"] .knit-app:has(#knitProductivityConvertView:not([hidden])) .knit-search-wrap,
html[data-device="phone"] .knit-app:has(#knitProductivityCraftView:not([hidden])) .knit-topbar,
html[data-device="tablet"] .knit-app:has(#knitProductivityCraftView:not([hidden])) .knit-topbar,
html[data-device="phone"] .knit-app:has(#knitProductivityCraftView:not([hidden])) .knit-search-wrap,
html[data-device="tablet"] .knit-app:has(#knitProductivityCraftView:not([hidden])) .knit-search-wrap,
html[data-device="phone"] .knit-app:has(#knitProductivityFactoryView:not([hidden])) .knit-topbar,
html[data-device="tablet"] .knit-app:has(#knitProductivityFactoryView:not([hidden])) .knit-topbar,
html[data-device="phone"] .knit-app:has(#knitProductivityFactoryView:not([hidden])) .knit-search-wrap,
html[data-device="tablet"] .knit-app:has(#knitProductivityFactoryView:not([hidden])) .knit-search-wrap,
html[data-device="phone"] body.knit-note-channel-pick-open .knit-topbar,
html[data-device="tablet"] body.knit-note-channel-pick-open .knit-topbar,
html[data-device="phone"] body.knit-note-channel-pick-open .knit-search-wrap,
html[data-device="tablet"] body.knit-note-channel-pick-open .knit-search-wrap,
html[data-device="phone"] body.knit-page--notes-open .knit-topbar,
html[data-device="tablet"] body.knit-page--notes-open .knit-topbar,
html[data-device="phone"] body.knit-page--notes-open .knit-search-wrap,
html[data-device="tablet"] body.knit-page--notes-open .knit-search-wrap,
html[data-device="phone"] body.knit-page--settings-open .knit-topbar,
html[data-device="tablet"] body.knit-page--settings-open .knit-topbar,
html[data-device="phone"] body.knit-page--settings-open .knit-search-wrap,
html[data-device="tablet"] body.knit-page--settings-open .knit-search-wrap,
html[data-device="phone"] body.knit-mobile-more-open .knit-topbar,
html[data-device="tablet"] body.knit-mobile-more-open .knit-topbar,
html[data-device="phone"] body.knit-mobile-more-open .knit-search-wrap,
html[data-device="tablet"] body.knit-mobile-more-open .knit-search-wrap,
html[data-device="phone"] body.knit-mobile-more-closing .knit-topbar,
html[data-device="tablet"] body.knit-mobile-more-closing .knit-topbar,
html[data-device="phone"] body.knit-mobile-more-closing .knit-search-wrap,
html[data-device="tablet"] body.knit-mobile-more-closing .knit-search-wrap,
html[data-device="phone"].knit-hide-topbar .knit-app .knit-topbar,
html[data-device="tablet"].knit-hide-topbar .knit-app .knit-topbar,
html[data-device="phone"].knit-hide-topbar .knit-app .knit-search-wrap,
html[data-device="tablet"].knit-hide-topbar .knit-app .knit-search-wrap,
html[data-device="phone"] .knit-app.knit-app--hide-topbar .knit-topbar,
html[data-device="tablet"] .knit-app.knit-app--hide-topbar .knit-topbar,
html[data-device="phone"] .knit-app.knit-app--hide-topbar .knit-search-wrap,
html[data-device="tablet"] .knit-app.knit-app--hide-topbar .knit-search-wrap {
  display: none !important;
}

html[data-device="phone"] .knit-app.knit-app--user-profile .knit-topbar,
html[data-device="tablet"] .knit-app.knit-app--user-profile .knit-topbar,
html[data-device="phone"] .knit-app.knit-app--user-profile .knit-search-wrap,
html[data-device="tablet"] .knit-app.knit-app--user-profile .knit-search-wrap,
html[data-device="phone"] .knit-app.knit-app--user-profile .knit-bottom-nav,
html[data-device="tablet"] .knit-app.knit-app--user-profile .knit-bottom-nav,
html[data-device="phone"] .knit-app.knit-app--user-profile .knit-mobile-home-tabs,
html[data-device="tablet"] .knit-app.knit-app--user-profile .knit-mobile-home-tabs,
html[data-device="phone"] .knit-app.knit-app--user-profile .knit-mobile-search-toggle,
html[data-device="tablet"] .knit-app.knit-app--user-profile .knit-mobile-search-toggle,
html[data-device="phone"] .knit-app.knit-app--user-profile .knit-mobile-notes-btn,
html[data-device="tablet"] .knit-app.knit-app--user-profile .knit-mobile-notes-btn,
html[data-device="phone"] .knit-app.knit-app--user-profile .knit-mobile-fav-float-btn,
html[data-device="tablet"] .knit-app.knit-app--user-profile .knit-mobile-fav-float-btn,
html[data-device="phone"] .knit-app.knit-app--user-profile .knit-home-back-to-top,
html[data-device="tablet"] .knit-app.knit-app--user-profile .knit-home-back-to-top {
  display: none !important;
}

html[data-device="phone"] .knit-app.knit-app--user-profile,
html[data-device="tablet"] .knit-app.knit-app--user-profile {
  --knit-bottom-nav-h: 0px;
}

html[data-device="phone"] .knit-app.knit-app--user-profile .knit-user-profile-view.knit-mine-view,
html[data-device="tablet"] .knit-app.knit-app--user-profile .knit-user-profile-view.knit-mine-view {
  padding-top: max(0.45rem, env(safe-area-inset-top, 0px));
  padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
}

html[data-device="phone"] .knit-messages-view,
html[data-device="tablet"] .knit-messages-view,
html[data-device="phone"] #knitMessagesView,
html[data-device="tablet"] #knitMessagesView {
  background: transparent;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(var(--knit-bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 0.4rem);
  padding-left: max(var(--knit-page-pad-x, 0.5rem), env(safe-area-inset-left, 0px));
  padding-right: max(var(--knit-page-pad-x, 0.5rem), env(safe-area-inset-right, 0px));
}

html[data-device="phone"] .knit-msg-topbar,
html[data-device="tablet"] .knit-msg-topbar {
  flex-direction: column;
  align-items: stretch;
  background: transparent;
  border-bottom: 0;
  padding: 0.2rem 0 0.12rem;
}

html[data-device="phone"] .knit-msg-search-wrap,
html[data-device="tablet"] .knit-msg-search-wrap {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.28rem;
  padding: 0.22rem 0.1rem 0.18rem;
  background: transparent;
  border-bottom: 0;
}

html[data-device="phone"] .knit-msg-search-open,
html[data-device="tablet"] .knit-msg-search-open {
  flex: 1 1 auto;
  min-width: 0;
  height: 2rem;
}

html[data-device="phone"] .knit-msg-cat,
html[data-device="tablet"] .knit-msg-cat {
  flex: 0 0 auto;
}

html[data-device="phone"] .knit-msg-body > .knit-channel-pager,
html[data-device="tablet"] .knit-msg-body > .knit-channel-pager {
  background: transparent;
}

html[data-device="phone"] .knit-msg-body .knit-channel-pager__hint,
html[data-device="tablet"] .knit-msg-body .knit-channel-pager__hint {
  min-height: 40vh;
}

html[data-device="phone"] .knit-msg-cat-toggle,
html[data-device="tablet"] .knit-msg-cat-toggle {
  min-height: 2rem;
  height: 2rem;
  padding: 0 0.34rem 0 0.55rem;
  font-size: 0.78rem;
  border-radius: 8px;
}

html[data-device="phone"] .knit-msg-tab-mute-btn,
html[data-device="tablet"] .knit-msg-tab-mute-btn,
html[data-device="phone"] .knit-msg-tab-mute-spacer,
html[data-device="tablet"] .knit-msg-tab-mute-spacer {
  width: 2rem;
  height: 2rem;
}

html[data-device="phone"] .knit-msg-tab-row,
html[data-device="tablet"] .knit-msg-tab-row {
  grid-template-columns: minmax(0, 1fr) 2rem;
}

html[data-device="phone"] .knit-msg-footer-actions,
html[data-device="tablet"] .knit-msg-footer-actions {
  justify-content: center;
  gap: 1.25rem;
  min-height: 2.1rem;
  padding: 0.2rem 0.5rem 0.45rem;
  background: transparent;
  border-top: 0;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

html[data-device="phone"] .knit-msg-mark-btn,
html[data-device="tablet"] .knit-msg-mark-btn,
html[data-device="phone"] .knit-msg-clear-btn,
html[data-device="tablet"] .knit-msg-clear-btn {
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  border: 0;
  outline: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.74rem;
  font-weight: 550;
  line-height: 1.2;
}

html[data-device="phone"] .knit-msg-friend .knit-msg-row,
html[data-device="tablet"] .knit-msg-friend .knit-msg-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

html[data-device="phone"] .knit-msg-chat .knit-msg-row,
html[data-device="tablet"] .knit-msg-chat .knit-msg-row,
html[data-device="phone"] .knit-msg-global-user .knit-msg-row,
html[data-device="tablet"] .knit-msg-global-user .knit-msg-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

html[data-device="phone"] .knit-msg-friend-actions,
html[data-device="tablet"] .knit-msg-friend-actions,
html[data-device="phone"] .knit-msg-global-user-actions,
html[data-device="tablet"] .knit-msg-global-user-actions {
  display: flex;
  flex-wrap: nowrap;
  flex-shrink: 0;
  align-items: center;
  gap: 0.2rem;
}

html[data-device="phone"] .knit-msg-chat-pin,
html[data-device="tablet"] .knit-msg-chat-pin {
  display: none;
}

html[data-device="phone"] .knit-msg-main-tabs,
html[data-device="tablet"] .knit-msg-main-tabs {
  display: flex;
  width: 100%;
  gap: 0;
  border-bottom: 0;
  align-items: stretch;
  box-sizing: border-box;
  height: 2.2rem;
  padding: 0.14rem;
  border-radius: 999px;
  background: var(--knit-control-bg, rgba(148, 163, 184, 0.16));
}

html[data-device="phone"] .knit-msg-main-tab,
html[data-device="tablet"] .knit-msg-main-tab {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: auto;
  padding: 0 0.35rem;
  border-radius: 999px;
  border-bottom: 0;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--knit-chrome-text-muted);
  line-height: 1.15;
}

html[data-device="phone"] .knit-msg-main-tab.is-active,
html[data-device="tablet"] .knit-msg-main-tab.is-active {
  color: var(--knit-chrome-active-text);
  background: var(--knit-chrome-active);
  border-bottom-color: transparent;
  font-size: 0.92rem;
  font-weight: 650;
}

html[data-device="phone"] .knit-msg-main-tabs.knit-seg-row > .knit-msg-main-tab.is-active,
html[data-device="tablet"] .knit-msg-main-tabs.knit-seg-row > .knit-msg-main-tab.is-active {
  background: transparent;
  font-size: 0.92rem;
  font-weight: 650;
}

html[data-device="phone"] .knit-msg-main-tabs.knit-seg-row > .knit-msg-main-tab,
html[data-device="tablet"] .knit-msg-main-tabs.knit-seg-row > .knit-msg-main-tab {
  font-size: 0.92rem;
  font-weight: 650;
  transition: color 0.18s ease;
}

html[data-device="phone"] .knit-msg-main-tab:hover,
html[data-device="tablet"] .knit-msg-main-tab:hover,
html[data-device="phone"] .knit-msg-main-tab.is-active:hover,
html[data-device="tablet"] .knit-msg-main-tab.is-active:hover {
  color: inherit;
}

html[data-device="phone"]:has(#knitFavoriteView:not([hidden])),
html[data-device="tablet"]:has(#knitFavoriteView:not([hidden])),
html[data-device="phone"]:has(#knitFavoriteView:not([hidden])) body,
html[data-device="tablet"]:has(#knitFavoriteView:not([hidden])) body {
  overflow: hidden;
}

html[data-device="phone"] #knitFavoriteView,
html[data-device="tablet"] #knitFavoriteView {
  padding-top: env(safe-area-inset-top, 0px);
  overflow-x: hidden;
  overflow-y: hidden;
  overscroll-behavior: none;
  touch-action: pan-y;
}

html[data-device="phone"] #knitFavoriteView .knit-favorite-list,
html[data-device="tablet"] #knitFavoriteView .knit-favorite-list {
  overflow-x: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y;
  min-width: 0;
  max-width: 100%;
}

html[data-device="phone"] .knit-favorite-batch-bar,
html[data-device="tablet"] .knit-favorite-batch-bar {
  position: sticky;
  bottom: calc(0.45rem + var(--knit-bottom-nav-h, 0px) + env(safe-area-inset-bottom, 0px));
  z-index: 12;
  margin-bottom: 0.35rem;
}

html[data-device="phone"] .knit-favorite-batch-bar__select,
html[data-device="tablet"] .knit-favorite-batch-bar__select {
  max-width: 8.2rem;
}

html[data-device="phone"] .knit-favorite-item,
html[data-device="tablet"] .knit-favorite-item,
html[data-device="phone"] .knit-favorite-color-shade,
html[data-device="tablet"] .knit-favorite-color-shade {
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

html[data-device="phone"] .knit-favorite-items,
html[data-device="tablet"] .knit-favorite-items {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.4rem), 1fr));
}

html[data-device="tablet"] .knit-favorite-items {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
}

html[data-device="phone"] .knit-msg-layout,
html[data-device="tablet"] .knit-msg-layout {
  flex-direction: column;
  min-height: calc(100vh - var(--knit-bottom-nav-h) - env(safe-area-inset-bottom, 0px));
}

html[data-device="phone"] .knit-msg-list-pane,
html[data-device="tablet"] .knit-msg-list-pane {
  width: 100%;
  max-width: none;
  border-right: none;
}

html[data-device="tablet"] .knit-msg-friend-group,
html[data-device="tablet"] .knit-msg-friend-group__list {
  gap: 0.35rem;
}

html[data-device="tablet"] .knit-msg-friend-heading {
  padding: 0.32rem 0.5rem;
  font-size: 0.72rem;
}

html[data-device="phone"] #knitDmModal.knit-dm-chat,
html[data-device="tablet"] #knitDmModal.knit-dm-chat {
  inset: auto !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  bottom: auto !important;
  width: 0 !important;
  height: 0 !important;
  max-width: none !important;
}

/* 收藏悬浮窗根节点必须保持 0×0，否则会把整页撑成遮罩、窗口无法浮起 */
html[data-device="phone"] #knitFavoriteFloatModal.knit-dup-modal,
html[data-device="tablet"] #knitFavoriteFloatModal.knit-dup-modal {
  inset: auto !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  width: 0 !important;
  height: 0 !important;
  max-width: none !important;
}

html[data-device="phone"] #knitFavoriteFloatModal .knit-fav-float__panel:not(.knit-dm-minimized-dock__item),
html[data-device="tablet"] #knitFavoriteFloatModal .knit-fav-float__panel:not(.knit-dm-minimized-dock__item) {
  width: min(22rem, calc(100vw - 1rem));
  max-width: calc(100vw - 1rem);
  height: min(70dvh, 34rem);
}

html[data-device="phone"] #knitDiandianModal.knit-dup-modal,
html[data-device="tablet"] #knitDiandianModal.knit-dup-modal {
  inset: auto !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  width: 0 !important;
  height: 0 !important;
  max-width: none !important;
}

html[data-device="phone"] .knit-dm-minimized-dock__item--diandian,
html[data-device="tablet"] .knit-dm-minimized-dock__item--diandian {
  top: var(--knit-diandian-hang-top, 48px) !important;
  right: 8px !important;
  width: 3.15rem !important;
  height: 5.5rem !important;
}

html[data-device="phone"] .knit-dm-minimized-dock__item--diandian .knit-diandian__cocoon,
html[data-device="phone"] .knit-dm-minimized-dock__item--diandian .knit-diandian__spider {
  filter: none;
}

html[data-device="phone"] #knitDiandianModal .knit-diandian__panel:not(.knit-dm-minimized-dock__item),
html[data-device="tablet"] #knitDiandianModal .knit-diandian__panel:not(.knit-dm-minimized-dock__item) {
  width: min(22rem, calc(100vw - 1rem));
  max-width: calc(100vw - 1rem);
  height: min(70dvh, 34rem);
  min-width: min(17.5rem, calc(100vw - 1rem));
  min-height: min(22rem, 58dvh);
  border-radius: 12px;
}

html[data-device="phone"] .knit-diandian__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

html[data-device="phone"] .knit-diandian__check {
  width: 1.4rem;
  height: 1.4rem;
}

html[data-device="phone"] .knit-diandian__check input {
  width: 0.95rem;
  height: 0.95rem;
}

html[data-device="phone"] .knit-diandian__bubble {
  right: 3.4rem;
  max-width: min(9.2rem, calc(100vw - 5.2rem));
}

html[data-device="phone"] .knit-mine-view,
html[data-device="tablet"] .knit-mine-view,
html[data-device="phone"] .knit-notes-view,
html[data-device="tablet"] .knit-notes-view,
html[data-device="phone"] .knit-developer-view,
html[data-device="tablet"] .knit-developer-view {
  padding-left: max(var(--knit-page-pad-x), env(safe-area-inset-left, 0px));
  padding-right: max(var(--knit-page-pad-x), env(safe-area-inset-right, 0px));
}

html[data-device="phone"] body,
html[data-device="tablet"] body {
  -webkit-text-size-adjust: 100%;
}

@media (hover: none) and (pointer: coarse) {
  .knit-sidebar button,
  .knit-bottom-nav__btn,
  .knit-mobile-more-grid button,
  .knit-mobile-more-logout {
    min-height: 44px;
  }
}

/* ========== 手机 / 平板：同步电脑端设置页与主栏目 ========== */
html[data-device="phone"] .knit-settings-nav__meta--desktop,
html[data-device="phone"] .knit-settings-nav__meta--tablet,
html[data-device="tablet"] .knit-settings-nav__meta--desktop,
html[data-device="tablet"] .knit-settings-nav__meta--compact {
  display: none;
}

html[data-device="phone"] .knit-settings-nav__meta--compact,
html[data-device="tablet"] .knit-settings-nav__meta--tablet {
  display: block;
}

html[data-device="phone"] .knit-settings-group[data-knit-settings-desktop-only],
html[data-device="tablet"] .knit-settings-group[data-knit-settings-desktop-only] {
  display: none !important;
}

html:not([data-device-login="desktop"]) .knit-settings-group[data-knit-settings-desktop-hw-only] {
  display: none !important;
}

html[data-device-login="desktop"] .knit-settings-nav__meta--desktop {
  display: block;
}

html[data-device-login="desktop"] .knit-settings-nav__meta--tablet,
html[data-device-login="desktop"] .knit-settings-nav__meta--compact {
  display: none;
}

html[data-device="phone"] #knitSettingsModal.knit-dup-modal,
html[data-device="tablet"] #knitSettingsModal.knit-dup-modal,
html[data-device="phone"] #knitMineEnterpriseModal.knit-mine-delete-modal,
html[data-device="tablet"] #knitMineEnterpriseModal.knit-mine-delete-modal {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  overflow: hidden;
  background: var(--knit-page-bg, var(--knit-modal-bg));
}

html[data-device="phone"] #knitSettingsModal.knit-dup-modal,
html[data-device="tablet"] #knitSettingsModal.knit-dup-modal {
  z-index: 1700;
  background: transparent;
}

html[data-device="phone"] #knitSettingsModal.is-open,
html[data-device="tablet"] #knitSettingsModal.is-open {
  background: var(--knit-page-bg, var(--knit-modal-bg));
}

html[data-device="phone"] .knit-settings-modal__panel,
html[data-device="tablet"] .knit-settings-modal__panel,
html[data-device="phone"] #knitMineEnterpriseModal .knit-mine-enterprise-panel,
html[data-device="tablet"] #knitMineEnterpriseModal .knit-mine-enterprise-panel {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: var(--knit-page-bg, var(--knit-modal-bg));
  transform: translate3d(100%, 0, 0);
  transition: transform 0.44s cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-device="phone"] #knitMineEnterpriseModal.is-open .knit-mine-enterprise-panel,
html[data-device="tablet"] #knitMineEnterpriseModal.is-open .knit-mine-enterprise-panel {
  transform: translate3d(0, 0, 0);
}

html[data-device="phone"] #knitSettingsModal.is-open:not(.knit-page--swipe-drag):not(.knit-page--swipe-anim) .knit-settings-modal__panel,
html[data-device="tablet"] #knitSettingsModal.is-open:not(.knit-page--swipe-drag):not(.knit-page--swipe-anim) .knit-settings-modal__panel {
  transform: translate3d(0, 0, 0) !important;
}

html[data-device="phone"] #knitSettingsModal.knit-page--swipe-drag .knit-settings-modal__panel,
html[data-device="tablet"] #knitSettingsModal.knit-page--swipe-drag .knit-settings-modal__panel,
html[data-device="phone"] #knitMineEnterpriseModal.knit-page--swipe-drag .knit-mine-enterprise-panel,
html[data-device="tablet"] #knitMineEnterpriseModal.knit-page--swipe-drag .knit-mine-enterprise-panel {
  transition: none;
}

html[data-device="phone"] #knitSettingsModal.knit-page--swipe-drag,
html[data-device="tablet"] #knitSettingsModal.knit-page--swipe-drag,
html[data-device="phone"] #knitMineEnterpriseModal.knit-page--swipe-drag,
html[data-device="tablet"] #knitMineEnterpriseModal.knit-page--swipe-drag {
  touch-action: none;
}

html[data-device="phone"] .knit-settings-modal__head,
html[data-device="tablet"] .knit-settings-modal__head,
html[data-device="phone"] .knit-mine-enterprise-head,
html[data-device="tablet"] .knit-mine-enterprise-head {
  padding: calc(0.7rem + env(safe-area-inset-top, 0px)) 0.85rem 0.7rem;
  min-height: 3.1rem;
}

html[data-device="phone"] .knit-settings-modal__back,
html[data-device="tablet"] .knit-settings-modal__back,
html[data-device="phone"] .knit-settings-modal__close,
html[data-device="tablet"] .knit-settings-modal__close,
html[data-device="phone"] .knit-mine-enterprise-close,
html[data-device="tablet"] .knit-mine-enterprise-close {
  width: 2.4rem;
  height: 2.4rem;
  min-width: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
}

html[data-device="phone"] .knit-settings-modal__title,
html[data-device="tablet"] .knit-settings-modal__title,
html[data-device="phone"] .knit-mine-enterprise-head .knit-mine-delete-title,
html[data-device="tablet"] .knit-mine-enterprise-head .knit-mine-delete-title {
  font-size: 1.08rem;
}

html[data-device="phone"] .knit-settings-modal__body,
html[data-device="tablet"] .knit-settings-modal__body {
  padding: 0.85rem 0.9rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  flex: 1 1 auto;
}

html[data-device="phone"] .knit-mine-enterprise-body,
html[data-device="tablet"] .knit-mine-enterprise-body {
  padding: 0.85rem 0.9rem 0.5rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  flex: 1 1 auto;
}

html[data-device="phone"] #knitMineEnterpriseModal .knit-mine-delete-actions,
html[data-device="tablet"] #knitMineEnterpriseModal .knit-mine-delete-actions {
  margin: 0;
  padding: 0.75rem 0.9rem calc(0.95rem + env(safe-area-inset-bottom, 0px));
  justify-content: stretch;
  gap: 0.65rem;
}

html[data-device="phone"] #knitMineEnterpriseModal .knit-mine-delete-btn,
html[data-device="tablet"] #knitMineEnterpriseModal .knit-mine-delete-btn {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  text-align: center;
}

html[data-device="phone"] #knitMineEnterpriseModal .knit-mine-enterprise-preview,
html[data-device="tablet"] #knitMineEnterpriseModal .knit-mine-enterprise-preview {
  max-height: min(42vh, 320px);
}

html[data-device="phone"] .knit-settings-nav,
html[data-device="tablet"] .knit-settings-nav,
html[data-device="phone"] .knit-settings-toggle,
html[data-device="tablet"] .knit-settings-toggle,
html[data-device="phone"] .knit-settings-option,
html[data-device="tablet"] .knit-settings-option {
  min-height: 3.15rem;
  padding: 0.85rem 0.9rem;
}

html[data-device="phone"] .knit-settings-nav,
html[data-device="tablet"] .knit-settings-nav {
  text-align: center;
  justify-items: center;
}

html[data-device="phone"] .knit-settings-nav__label,
html[data-device="tablet"] .knit-settings-nav__label,
html[data-device="phone"] .knit-settings-nav__meta,
html[data-device="tablet"] .knit-settings-nav__meta {
  text-align: center;
  justify-self: stretch;
}

html[data-device="phone"] .knit-settings-nav__value,
html[data-device="tablet"] .knit-settings-nav__value {
  text-align: center;
}

html[data-device="phone"] .knit-settings-option,
html[data-device="tablet"] .knit-settings-option {
  text-align: center;
}

html[data-device="phone"] .knit-settings-nav__label,
html[data-device="tablet"] .knit-settings-nav__label {
  font-size: 0.98rem;
}

html[data-device="phone"] .knit-settings-pick,
html[data-device="tablet"] .knit-settings-pick {
  min-height: 2.75rem;
  padding: 0.62rem 0.7rem;
  font-size: 0.92rem;
  justify-content: center;
  text-align: center;
}

html[data-device="phone"] .knit-settings-pick-label,
html[data-device="tablet"] .knit-settings-pick-label {
  text-align: center;
}

html[data-device="phone"] .knit-settings-switch,
html[data-device="tablet"] .knit-settings-switch {
  width: 2.6rem;
  height: 1.42rem;
}

html[data-device="phone"] .knit-settings-switch::after,
html[data-device="tablet"] .knit-settings-switch::after {
  width: 1.16rem;
  height: 1.16rem;
}

html[data-device="phone"] .knit-settings-toggle input:checked + .knit-settings-switch::after,
html[data-device="tablet"] .knit-settings-toggle input:checked + .knit-settings-switch::after {
  transform: translateX(1.16rem);
}

html[data-device="phone"] .knit-settings-search,
html[data-device="tablet"] .knit-settings-search,
html[data-device="phone"] .knit-settings-field input,
html[data-device="tablet"] .knit-settings-field input {
  min-height: 2.7rem;
  font-size: 1rem;
}

html[data-device="phone"] .knit-settings-primary-btn,
html[data-device="tablet"] .knit-settings-primary-btn,
html[data-device="phone"] .knit-settings-secondary-btn,
html[data-device="tablet"] .knit-settings-secondary-btn {
  min-height: 2.75rem;
  width: 100%;
}

html[data-device="phone"] .knit-settings-user-item,
html[data-device="tablet"] .knit-settings-user-item,
html[data-device="phone"] .knit-settings-suggest-item,
html[data-device="tablet"] .knit-settings-suggest-item {
  min-height: 3rem;
  padding: 0.7rem 0.2rem;
}

html[data-device="phone"] .knit-settings-user-remove,
html[data-device="tablet"] .knit-settings-user-remove,
html[data-device="phone"] .knit-settings-device-remove,
html[data-device="tablet"] .knit-settings-device-remove {
  min-height: 2.1rem;
  padding: 0.35rem 0.7rem;
}

html[data-device="phone"] .knit-group-info-panel,
html[data-device="tablet"] .knit-group-info-panel {
  left: 0;
  width: 100%;
  border-left: none;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

html[data-device="phone"] .knit-group-info-action,
html[data-device="tablet"] .knit-group-info-action {
  min-height: 3.15rem;
  padding: 0.9rem 1rem;
  font-size: 0.98rem;
}

html[data-device="phone"] body.knit-group-info-open .knit-bottom-nav,
html[data-device="tablet"] body.knit-group-info-open .knit-bottom-nav,
html[data-device="phone"] body.knit-group-info-closing .knit-bottom-nav,
html[data-device="tablet"] body.knit-group-info-closing .knit-bottom-nav,
html[data-device="phone"] body.knit-mobile-more-open .knit-bottom-nav,
html[data-device="tablet"] body.knit-mobile-more-open .knit-bottom-nav,
html[data-device="phone"] body.knit-mobile-more-closing .knit-bottom-nav,
html[data-device="tablet"] body.knit-mobile-more-closing .knit-bottom-nav,
html[data-device="phone"] body.knit-page--settings-open .knit-bottom-nav,
html[data-device="tablet"] body.knit-page--settings-open .knit-bottom-nav,
html[data-device="phone"] body.knit-page--settings-open .knit-note-channel-pick,
html[data-device="tablet"] body.knit-page--settings-open .knit-note-channel-pick,
html[data-device="phone"] body.knit-page--enterprise-open .knit-bottom-nav,
html[data-device="tablet"] body.knit-page--enterprise-open .knit-bottom-nav,
html[data-device="phone"] body.knit-page--enterprise-open .knit-mobile-more,
html[data-device="tablet"] body.knit-page--enterprise-open .knit-mobile-more,
html[data-device="phone"] body.knit-page--enterprise-open .knit-note-channel-pick,
html[data-device="tablet"] body.knit-page--enterprise-open .knit-note-channel-pick {
  display: none !important;
}

html[data-device="phone"] body.knit-group-info-open,
html[data-device="tablet"] body.knit-group-info-open,
html[data-device="phone"] body.knit-group-info-closing,
html[data-device="tablet"] body.knit-group-info-closing,
html[data-device="phone"] body.knit-mobile-more-open,
html[data-device="tablet"] body.knit-mobile-more-open,
html[data-device="phone"] body.knit-mobile-more-closing,
html[data-device="tablet"] body.knit-mobile-more-closing,
html[data-device="phone"] body.knit-page--settings-open,
html[data-device="tablet"] body.knit-page--settings-open,
html[data-device="phone"] body.knit-page--enterprise-open,
html[data-device="tablet"] body.knit-page--enterprise-open {
  overflow: hidden;
  touch-action: none;
}

html[data-device="phone"] body.knit-group-info-open .knit-group-info,
html[data-device="tablet"] body.knit-group-info-open .knit-group-info,
html[data-device="phone"] body.knit-group-info-open .knit-group-info-body,
html[data-device="tablet"] body.knit-group-info-open .knit-group-info-body {
  touch-action: pan-y;
}

html[data-device="phone"] body.knit-page--settings-open .knit-mobile-more,
html[data-device="tablet"] body.knit-page--settings-open .knit-mobile-more {
  pointer-events: none;
}

html[data-device="phone"] body.knit-page--settings-open .knit-settings-modal,
html[data-device="tablet"] body.knit-page--settings-open .knit-settings-modal,
html[data-device="phone"] body.knit-page--settings-open .knit-settings-modal__panel,
html[data-device="tablet"] body.knit-page--settings-open .knit-settings-modal__panel,
html[data-device="phone"] body.knit-page--settings-open .knit-settings-modal__head,
html[data-device="tablet"] body.knit-page--settings-open .knit-settings-modal__head,
html[data-device="phone"] body.knit-page--settings-open .knit-settings-modal__body,
html[data-device="tablet"] body.knit-page--settings-open .knit-settings-modal__body,
html[data-device="phone"] body.knit-page--enterprise-open #knitMineEnterpriseModal,
html[data-device="tablet"] body.knit-page--enterprise-open #knitMineEnterpriseModal,
html[data-device="phone"] body.knit-page--enterprise-open .knit-mine-enterprise-body,
html[data-device="tablet"] body.knit-page--enterprise-open .knit-mine-enterprise-body {
  touch-action: pan-y;
}

/* 我的 / 笔记 / 生产力：避开底栏，触控更易点 */
html[data-device="phone"] .knit-mine-profile,
html[data-device="tablet"] .knit-mine-profile {
  position: relative;
  flex-wrap: wrap;
  gap: 0.65rem;
}

html[data-device="phone"] .knit-mine-more-btn,
html[data-device="tablet"] .knit-mine-more-btn {
  position: absolute;
  top: 0.55rem;
  right: max(0.55rem, env(safe-area-inset-right, 0px));
  z-index: 2;
  margin-left: 0;
}

html[data-device="phone"] .knit-mine-profile-main,
html[data-device="tablet"] .knit-mine-profile-main {
  padding-right: 3.1rem;
}

html[data-device="phone"] .knit-biz-curl {
  display: none !important;
}

html[data-device="phone"] .knit-biz-book.is-open .knit-biz-leaf--front {
  transform: translate3d(-108%, 0, 0);
  box-shadow: none;
}

html[data-device="phone"] .knit-biz-leaf--front {
  transition: transform 0.38s ease;
}

html[data-device="phone"] .knit-biz-board-nav {
  display: none;
}

html[data-device="phone"] .knit-biz-sheet {
  padding: 0.85rem 0.8rem 1.1rem;
}

html[data-device="tablet"] .knit-biz-curl {
  width: 88px;
  height: 88px;
}

html[data-device="tablet"] .knit-biz-curl-fold {
  width: 82px;
  height: 82px;
}

html[data-device="phone"] .knit-mine-edit-btn,
html[data-device="tablet"] .knit-mine-edit-btn,
html[data-device="phone"] .knit-mine-qr-btn,
html[data-device="tablet"] .knit-mine-qr-btn {
  min-height: 2.3rem;
}

html[data-device="phone"] #knitMineEnterpriseBtn,
html[data-device="tablet"] #knitMineEnterpriseBtn {
  display: none !important;
}

html[data-device="phone"] .knit-creator-view,
html[data-device="tablet"] .knit-creator-view {
  padding: 0.75rem 0.75rem calc(4.6rem + var(--knit-bottom-nav-h) + env(safe-area-inset-bottom));
}

html[data-device="phone"] body.knit-page--notes-open .knit-creator-view,
html[data-device="tablet"] body.knit-page--notes-open .knit-creator-view {
  padding-top: 2.85rem;
}

html[data-device="phone"] .knit-creator-footer,
html[data-device="tablet"] .knit-creator-footer {
  left: 0.65rem;
  right: 0.65rem;
  bottom: calc(0.45rem + var(--knit-bottom-nav-h) + env(safe-area-inset-bottom));
}

html[data-device="phone"] .knit-creator-footer-btn,
html[data-device="tablet"] .knit-creator-footer-btn {
  min-height: 2.6rem;
  flex: 1 1 0;
}

html[data-device="phone"] .knit-favorite-modal__checklist,
html[data-device="tablet"] .knit-favorite-modal__checklist {
  max-height: 40vh;
}

html[data-device="phone"] .knit-favorite-modal__check,
html[data-device="tablet"] .knit-favorite-modal__check {
  min-height: 2.2rem;
}

html[data-device="phone"] .knit-note-cover-hint,
html[data-device="tablet"] .knit-note-cover-hint {
  padding: 0.55rem 0.65rem;
}

html[data-device="phone"] .knit-note-cover-hint__preview,
html[data-device="tablet"] .knit-note-cover-hint__preview {
  width: 5.4rem;
  height: 7.2rem;
}

html[data-device="phone"] .knit-note-channel-switch,
html[data-device="tablet"] .knit-note-channel-switch,
html[data-device="phone"] #knitDeveloperView:not([hidden]) .knit-note-channel-switch,
html[data-device="tablet"] #knitDeveloperView:not([hidden]) .knit-note-channel-switch {
  display: none !important;
}

html[data-device="phone"] body.knit-page--notes-open,
html[data-device="tablet"] body.knit-page--notes-open,
html[data-device="phone"] body:has(#knitNotesView:not([hidden])),
html[data-device="tablet"] body:has(#knitNotesView:not([hidden])),
html[data-device="phone"] body:has(#knitCreatorView:not([hidden])),
html[data-device="tablet"] body:has(#knitCreatorView:not([hidden])),
html[data-device="phone"] body:has(#knitDeveloperView:not([hidden])),
html[data-device="tablet"] body:has(#knitDeveloperView:not([hidden])) {
  --knit-bottom-nav-h: 0px;
}

html[data-device="phone"] #knitBottomNav[hidden],
html[data-device="tablet"] #knitBottomNav[hidden],
html[data-device="phone"] body.knit-page--notes-open #knitBottomNav,
html[data-device="tablet"] body.knit-page--notes-open #knitBottomNav,
html[data-device="phone"] body:has(#knitNotesView:not([hidden])) #knitBottomNav,
html[data-device="tablet"] body:has(#knitNotesView:not([hidden])) #knitBottomNav,
html[data-device="phone"] body:has(#knitCreatorView:not([hidden])) #knitBottomNav,
html[data-device="tablet"] body:has(#knitCreatorView:not([hidden])) #knitBottomNav,
html[data-device="phone"] body:has(#knitDeveloperView:not([hidden])) #knitBottomNav,
html[data-device="tablet"] body:has(#knitDeveloperView:not([hidden])) #knitBottomNav {
  display: none !important;
}

html[data-device="phone"] .knit-note-page-back,
html[data-device="tablet"] .knit-note-page-back,
html[data-device="phone"] #knitDeveloperView:not([hidden]) .knit-note-page-back,
html[data-device="tablet"] #knitCreatorView:not([hidden]) .knit-note-page-back,
html[data-device="phone"] #knitCreatorView:not([hidden]) .knit-note-page-back,
html[data-device="tablet"] #knitDeveloperView:not([hidden]) .knit-note-page-back {
  top: 0.55rem;
  left: max(0.55rem, env(safe-area-inset-left, 0px));
}

html[data-device="phone"] .knit-msg-layout,
html[data-device="tablet"] .knit-msg-layout {
  min-height: calc(100dvh - var(--knit-bottom-nav-h) - env(safe-area-inset-bottom, 0px));
}

html[data-device="phone"] #knitDmModal .knit-dm-chat__panel--positioned:not(.knit-dm-chat__panel--minimized),
html[data-device="tablet"] #knitDmModal .knit-dm-chat__panel--positioned:not(.knit-dm-chat__panel--minimized) {
  max-height: calc(100dvh - var(--knit-bottom-nav-h, 58px) - env(safe-area-inset-bottom, 0px) - 16px);
}

html[data-device="phone"] #knitDmModal .knit-dm-chat__panel--positioned:not(.knit-dm-chat__panel--minimized) .knit-dm-chat__composer,
html[data-device="tablet"] #knitDmModal .knit-dm-chat__panel--positioned:not(.knit-dm-chat__panel--minimized) .knit-dm-chat__composer {
  flex-shrink: 0;
}

html[data-device="phone"] #knitDmModal .knit-dm-chat__panel--fullscreen,
html[data-device="tablet"] #knitDmModal .knit-dm-chat__panel--fullscreen {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  width: 100% !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  box-shadow: none;
  transform: none !important;
  touch-action: manipulation;
}

html[data-device="phone"] #knitDmModal .knit-dm-chat__panel--fullscreen.knit-dm-chat__panel--keyboard,
html[data-device="tablet"] #knitDmModal .knit-dm-chat__panel--fullscreen.knit-dm-chat__panel--keyboard {
  height: var(--knit-dm-vv-height, 100dvh) !important;
}

html.knit-page--dm-open,
html.knit-page--dm-open body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}

html[data-device="phone"] body.knit-page--dm-open,
html[data-device="tablet"] body.knit-page--dm-open {
  --knit-bottom-nav-h: 0px;
}

html[data-device="phone"] body.knit-page--dm-open #knitBottomNav,
html[data-device="tablet"] body.knit-page--dm-open #knitBottomNav,
html[data-device="phone"] body.knit-page--dm-open .knit-topbar,
html[data-device="tablet"] body.knit-page--dm-open .knit-topbar,
html[data-device="phone"] body.knit-page--fullpage-open #knitBottomNav,
html[data-device="tablet"] body.knit-page--fullpage-open #knitBottomNav,
html[data-device="phone"] body.knit-page--fullpage-open .knit-topbar,
html[data-device="tablet"] body.knit-page--fullpage-open .knit-topbar,
html[data-device="phone"] body.knit-note-channel-pick-open #knitBottomNav,
html[data-device="tablet"] body.knit-note-channel-pick-open #knitBottomNav,
html[data-device="phone"] body.knit-note-channel-pick-open .knit-mobile-more,
html[data-device="tablet"] body.knit-note-channel-pick-open .knit-mobile-more,
html[data-device="phone"] body.knit-note-channel-pick-open .knit-mobile-home-tabs,
html[data-device="tablet"] body.knit-note-channel-pick-open .knit-mobile-home-tabs,
html[data-device="phone"] body.knit-note-channel-pick-open .knit-mobile-search-toggle,
html[data-device="tablet"] body.knit-note-channel-pick-open .knit-mobile-search-toggle,
html[data-device="phone"] body.knit-note-channel-pick-open .knit-mobile-notes-btn,
html[data-device="tablet"] body.knit-note-channel-pick-open .knit-mobile-notes-btn,
html[data-device="phone"] body.knit-note-channel-pick-open .knit-mobile-fav-float-btn,
html[data-device="tablet"] body.knit-note-channel-pick-open .knit-mobile-fav-float-btn,
html[data-device="phone"] body.knit-page--notes-open .knit-mobile-home-tabs,
html[data-device="tablet"] body.knit-page--notes-open .knit-mobile-home-tabs,
html[data-device="phone"] body.knit-page--notes-open .knit-mobile-search-toggle,
html[data-device="tablet"] body.knit-page--notes-open .knit-mobile-search-toggle,
html[data-device="phone"] body.knit-page--notes-open .knit-mobile-notes-btn,
html[data-device="tablet"] body.knit-page--notes-open .knit-mobile-notes-btn,
html[data-device="phone"] body.knit-page--notes-open .knit-mobile-fav-float-btn,
html[data-device="tablet"] body.knit-page--notes-open .knit-mobile-fav-float-btn {
  display: none !important;
}

html[data-device="phone"] body.knit-note-channel-pick-open,
html[data-device="tablet"] body.knit-note-channel-pick-open {
  --knit-bottom-nav-h: 0px;
  overflow: hidden;
}

html[data-device="phone"] body.knit-page--fullpage-open,
html[data-device="tablet"] body.knit-page--fullpage-open {
  --knit-bottom-nav-h: 0px;
}

html[data-device="phone"] #knitFullpage:not([data-knit-yarn-detail="1"]) .knit-fullpage-close--on-media,
html[data-device="tablet"] #knitFullpage:not([data-knit-yarn-detail="1"]) .knit-fullpage-close--on-media {
  display: none !important;
}

html[data-device="phone"] #knitFullpage:not([data-knit-yarn-detail="1"]) .knit-fp-author .knit-fullpage-close--in-flow,
html[data-device="tablet"] #knitFullpage:not([data-knit-yarn-detail="1"]) .knit-fp-author .knit-fullpage-close--in-flow {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  font-size: 2.05rem;
  font-weight: 800;
  line-height: 1;
  color: var(--knit-text-heading);
  -webkit-text-stroke: 0.55px currentColor;
}

html[data-knit-theme="dark"][data-device="phone"] #knitFullpage:not([data-knit-yarn-detail="1"]) .knit-fp-author .knit-fullpage-close--in-flow,
html[data-knit-theme="dark"][data-device="tablet"] #knitFullpage:not([data-knit-yarn-detail="1"]) .knit-fp-author .knit-fullpage-close--in-flow {
  color: #f3f4f6;
}

html[data-device="phone"] #knitFullpage:not([data-knit-yarn-detail="1"]) .knit-fp-author,
html[data-device="tablet"] #knitFullpage:not([data-knit-yarn-detail="1"]) .knit-fp-author {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  flex-shrink: 0;
  margin-bottom: 0.7rem;
  padding-top: 0.45rem;
  padding-bottom: 0.55rem;
  background: var(--knit-view-bg, #fafafa);
}

html[data-device="phone"] #knitFullpage:not([data-knit-yarn-detail="1"]) .knit-fp-author {
  margin-left: -0.9rem;
  margin-right: -0.9rem;
  padding-left: 0.9rem;
  padding-right: 0.9rem;
}

html[data-device="tablet"] #knitFullpage:not([data-knit-yarn-detail="1"]) .knit-fp-author {
  margin-left: -1.15rem;
  margin-right: -1.15rem;
  padding-left: 1.15rem;
  padding-right: 1.15rem;
}

html[data-device="phone"] .knit-fp-author-actions,
html[data-device="tablet"] .knit-fp-author-actions {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}

html[data-device="phone"] #knitFpFollowBtn,
html[data-device="tablet"] #knitFpFollowBtn {
  margin-left: 0;
}

html[data-device="phone"] .knit-fp-header-share,
html[data-device="tablet"] .knit-fp-header-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

html[data-device="phone"] #knitFpShareBtn,
html[data-device="tablet"] #knitFpShareBtn {
  display: none !important;
}

html[data-device="phone"] .knit-fp-action-bar,
html[data-device="tablet"] .knit-fp-action-bar {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

html[data-device="phone"] .knit-fp-action-bar:has(#knitFpSizeChartBtn:not([hidden])),
html[data-device="tablet"] .knit-fp-action-bar:has(#knitFpSizeChartBtn:not([hidden])) {
  margin-bottom: 0.75rem;
}

html[data-device="phone"] .knit-fp-action-dock,
html[data-device="tablet"] .knit-fp-action-dock {
  display: flex;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1600;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.3rem 0.75rem calc(0.3rem + env(safe-area-inset-bottom, 0px));
  background: var(--knit-view-bg, #fafafa);
  border-top: 1px solid var(--knit-divider, #eee);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.08);
}

/* 挂到 body 后脱离全页 transform / overflow，始终贴视口底部 */
html[data-device="phone"] .knit-fp-action-dock--portal,
html[data-device="tablet"] .knit-fp-action-dock--portal {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: 1560;
  pointer-events: auto;
}

html[data-device="phone"] #knitUserProfileView.knit-user-profile-view--sheet-enter,
html[data-device="tablet"] #knitUserProfileView.knit-user-profile-view--sheet-enter {
  will-change: transform;
  backface-visibility: hidden;
}

html[data-device="phone"] .knit-fp-action-dock .knit-fp-action-btn,
html[data-device="tablet"] .knit-fp-action-dock .knit-fp-action-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2rem;
  justify-content: center;
  text-align: center;
}

html[data-device="phone"] .knit-fp-action-dock .knit-fp-comment-dock:not([hidden]),
html[data-device="tablet"] .knit-fp-action-dock .knit-fp-comment-dock:not([hidden]) {
  flex: 1.7 1 42%;
  min-width: 6.2rem;
  min-height: 2rem;
  justify-content: flex-start;
  text-align: left;
  padding-left: 0.75rem;
  padding-right: 0.4rem;
  font-weight: 500;
  color: var(--knit-text-muted, #6b7280);
  background: var(--knit-input-bg, #f3f4f6);
  border-color: transparent;
}

html[data-device="phone"] .knit-fp-action-dock:has(#knitFpCommentDockBtn:not([hidden])) .knit-fp-action-btn:not(.knit-fp-comment-dock),
html[data-device="tablet"] .knit-fp-action-dock:has(#knitFpCommentDockBtn:not([hidden])) .knit-fp-action-btn:not(.knit-fp-comment-dock) {
  flex: 0 1 auto;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}

html[data-device="phone"] .knit-fp-back-to-top,
html[data-device="tablet"] .knit-fp-back-to-top {
  bottom: calc(3.15rem + env(safe-area-inset-bottom, 0px));
}

html[data-device="phone"] #knitFullpage[data-knit-fp-comments="1"] .knit-fp-compose,
html[data-device="tablet"] #knitFullpage[data-knit-fp-comments="1"] .knit-fp-compose {
  display: none;
}

html[data-knit-theme="dark"][data-device="phone"] .knit-fp-action-dock,
html[data-knit-theme="dark"][data-device="tablet"] .knit-fp-action-dock {
  background: var(--knit-view-bg, #1a1a1a);
  border-top-color: var(--knit-divider);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.35);
}

@media (hover: none) and (pointer: coarse) {
  .knit-settings-nav,
  .knit-settings-toggle,
  .knit-settings-option,
  .knit-settings-pick,
  .knit-settings-primary-btn,
  .knit-settings-secondary-btn {
    min-height: 44px;
  }
}

/* 提示 / 空状态：与桌面同一套字，手机略放大便于阅读 */
html[data-device="phone"],
html[data-device="tablet"] {
  --knit-hint-size: 0.875rem;
  --knit-hint-lh: 1.7;
  --knit-hint-ls: 0.01em;
  --knit-empty-size: 0.95rem;
  --knit-empty-lh: 1.7;
  --knit-empty-ls: 0.02em;
}

html[data-device="phone"] .knit-grid > .knit-home-empty,
html[data-device="tablet"] .knit-grid > .knit-home-empty,
html[data-device="phone"] .knit-user-profile-empty,
html[data-device="tablet"] .knit-user-profile-empty,
html[data-device="phone"] .knit-list-state,
html[data-device="tablet"] .knit-list-state {
  padding: 2.6rem 1.1rem;
}

html[data-device="phone"] .knit-mine-empty,
html[data-device="tablet"] .knit-mine-empty,
html[data-device="phone"] .knit-msg-empty,
html[data-device="tablet"] .knit-msg-empty,
html[data-device="phone"] .knit-admin-empty,
html[data-device="tablet"] .knit-admin-empty,
html[data-device="phone"] .knit-settings-empty,
html[data-device="tablet"] .knit-settings-empty {
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

html[data-device="phone"] .knit-creator-compress-hint,
html[data-device="tablet"] .knit-creator-compress-hint,
html[data-device="phone"] .knit-dev-news-hint,
html[data-device="tablet"] .knit-dev-news-hint,
html[data-device="phone"] .knit-dev-colorcard-grid-hint,
html[data-device="tablet"] .knit-dev-colorcard-grid-hint,
html[data-device="phone"] .knit-dev-ecc-slot-batch-hint,
html[data-device="tablet"] .knit-dev-ecc-slot-batch-hint,
html[data-device="phone"] .knit-dev-size-chart-hint,
html[data-device="tablet"] .knit-dev-size-chart-hint,
html[data-device="phone"] .knit-dev-hover-picker-hint,
html[data-device="tablet"] .knit-dev-hover-picker-hint,
html[data-device="phone"] .knit-mine-blocklist-hint,
html[data-device="tablet"] .knit-mine-blocklist-hint,
html[data-device="phone"] .knit-settings-hint,
html[data-device="tablet"] .knit-settings-hint,
html[data-device="phone"] .knit-settings-login-hint,
html[data-device="tablet"] .knit-settings-login-hint {
  max-width: 38rem;
}

html[data-device="phone"] .knit-mine-share-modal {
  align-items: flex-end;
  padding: 0;
}

html[data-device="phone"] .knit-mine-share-modal .knit-mine-qr-panel {
  width: 100%;
  max-width: none;
  max-height: min(92dvh, 860px);
  border-radius: 22px 22px 0 0;
  padding: 0.95rem 1rem calc(0.95rem + env(safe-area-inset-bottom, 0px));
}

html[data-device="phone"] .knit-mine-share-modal .knit-mine-qr-panel::before {
  content: "";
  display: block;
  width: 2.4rem;
  height: 0.28rem;
  margin: 0 auto 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.16);
}

html[data-knit-theme="dark"][data-device="phone"] .knit-mine-share-modal .knit-mine-qr-panel::before {
  background: rgba(255, 255, 255, 0.22);
}

html[data-device="phone"] .knit-mine-share-qr-plate,
html[data-device="tablet"] .knit-mine-share-qr-plate {
  padding: 0.7rem;
}

html[data-device="phone"] .knit-mine-qr-canvas,
html[data-device="tablet"] .knit-mine-qr-canvas {
  width: min(188px, 52vw);
}

html[data-device="phone"] .knit-mine-login-qr-canvas,
html[data-device="tablet"] .knit-mine-login-qr-canvas {
  width: min(112px, 34vw);
}

html[data-device="phone"] .knit-mine-qr-panel .knit-mine-qr-actions,
html[data-device="tablet"] .knit-mine-qr-panel .knit-mine-qr-actions {
  flex-direction: column;
}

html[data-device="phone"] .knit-mine-share-btn,
html[data-device="tablet"] .knit-mine-share-btn {
  flex: 1 1 auto;
  width: 100%;
  min-height: 2.6rem;
}

html[data-device="phone"] .knit-dm-chat__image-btn,
html[data-device="tablet"] .knit-dm-chat__image-btn {
  display: none !important;
}

html[data-device="phone"] .knit-dm-chat__input,
html[data-device="tablet"] .knit-dm-chat__input,
html[data-device="phone"] .knit-msg-search,
html[data-device="tablet"] .knit-msg-search {
  font-size: 16px;
  line-height: 1.4;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html[data-device="phone"] .knit-dm-chat__composer,
html[data-device="tablet"] .knit-dm-chat__composer {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
}

html[data-device="phone"] .knit-dm-chat__composer:has(.knit-dm-chat__tools:not([hidden])),
html[data-device="tablet"] .knit-dm-chat__composer:has(.knit-dm-chat__tools:not([hidden])) {
  padding-bottom: 0;
}

html[data-device="phone"] .knit-dm-chat__composer-row,
html[data-device="tablet"] .knit-dm-chat__composer-row {
  padding: 0.62rem 0.75rem;
  gap: 0.48rem;
}

html[data-device="phone"] .knit-dm-chat__tools,
html[data-device="tablet"] .knit-dm-chat__tools {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.2rem 0.7rem calc(0.8rem + env(safe-area-inset-bottom, 0px));
}

html[data-device="phone"] .knit-dm-chat__tool-tile,
html[data-device="tablet"] .knit-dm-chat__tool-tile {
  min-height: 4.85rem;
  font-size: 0.7rem;
  border-radius: 13px;
}

html[data-device="phone"] .knit-dm-chat__voice-hold,
html[data-device="tablet"] .knit-dm-chat__voice-hold {
  min-height: 2.55rem;
  font-size: 0.95rem;
}

html[data-device="phone"] .knit-dm-pick-modal,
html[data-device="tablet"] .knit-dm-pick-modal {
  align-items: flex-end;
  padding: 0;
}

html[data-device="phone"] .knit-dm-pick-panel,
html[data-device="tablet"] .knit-dm-pick-panel {
  width: 100%;
  max-width: none;
  max-height: min(86dvh, 720px);
  border-radius: 18px 18px 0 0;
  padding: 0.95rem 1rem calc(0.95rem + env(safe-area-inset-bottom, 0px));
}

html[data-device="phone"] .knit-dm-pick-panel::before,
html[data-device="tablet"] .knit-dm-pick-panel::before {
  content: "";
  display: block;
  width: 2.4rem;
  height: 0.28rem;
  margin: 0 auto 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.16);
}

html[data-knit-theme="dark"][data-device="phone"] .knit-dm-pick-panel::before,
html[data-knit-theme="dark"][data-device="tablet"] .knit-dm-pick-panel::before {
  background: rgba(255, 255, 255, 0.22);
}

html[data-device="phone"] .knit-dm-pick-item,
html[data-device="tablet"] .knit-dm-pick-item {
  min-height: 3.05rem;
}

html[data-device="phone"] .knit-dm-call-overlay,
html[data-device="tablet"] .knit-dm-call-overlay {
  padding: 0;
  align-items: stretch;
}

html[data-device="phone"] .knit-dm-call-card,
html[data-device="tablet"] .knit-dm-call-card {
  width: 100%;
  min-height: 100%;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.2rem 1.25rem calc(2.2rem + env(safe-area-inset-bottom, 0px));
}

html[data-device="phone"] .knit-dm-call-name,
html[data-device="tablet"] .knit-dm-call-name {
  font-size: 1.55rem;
}

html[data-device="phone"] .knit-dm-call-btn,
html[data-device="tablet"] .knit-dm-call-btn {
  min-width: 7.2rem;
  min-height: 3rem;
}

html[data-device="phone"] .knit-dev-bmp-bridge__preview-row {
  grid-template-columns: 1fr;
}

html[data-device="phone"] .knit-dev-bmp-bridge__swatch {
  width: 100%;
}

/* 首页资讯/灵感/材料三页常驻，左右滑只平移，不重绘 */
html[data-device="phone"] #knitScrollport.knit-scrollport--home-deck,
html[data-device="tablet"] #knitScrollport.knit-scrollport--home-deck {
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
}

html[data-device="phone"] #knitScrollport.knit-scrollport--home-deck > #knitHomeGridTopHover,
html[data-device="tablet"] #knitScrollport.knit-scrollport--home-deck > #knitHomeGridTopHover {
  display: none;
}

html[data-device="phone"] #knitHomeDeck,
html[data-device="tablet"] #knitHomeDeck {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
  overscroll-behavior-x: none;
  background: var(--knit-main-bg, transparent);
}

html[data-device="phone"] #knitHomeDeck[hidden],
html[data-device="tablet"] #knitHomeDeck[hidden] {
  display: none !important;
}

html[data-device="phone"] .knit-home-deck__track,
html[data-device="tablet"] .knit-home-deck__track {
  display: flex;
  align-items: stretch;
  height: 100%;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

html[data-device="phone"] #knitHomeDeck.is-dragging .knit-home-deck__track,
html[data-device="tablet"] #knitHomeDeck.is-dragging .knit-home-deck__track {
  transition: none;
}

html[data-device="phone"] #knitHomeDeck.is-animating .knit-home-deck__track,
html[data-device="tablet"] #knitHomeDeck.is-animating .knit-home-deck__track {
  transition: transform 0.2s cubic-bezier(0.22, 0.82, 0.18, 1);
}

html[data-device="phone"] .knit-home-deck__page,
html[data-device="tablet"] .knit-home-deck__page {
  box-sizing: border-box;
  height: 100%;
  min-height: 0;
  flex: 0 0 auto;
  touch-action: pan-y;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  overscroll-behavior-x: none;
  scrollbar-width: none;
  contain: layout paint;
  isolation: isolate;
  -webkit-user-select: none;
  user-select: none;
  padding-top: calc(var(--knit-top-overlay) + var(--knit-chrome-gap));
  padding-bottom: calc(
    var(--knit-bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 0.65rem
  );
}

/* 材料/资讯网格无 sleeve，左右边距与灵感（.knit-grid-sleeve）对齐 */
html[data-device="phone"] .knit-home-deck__page[data-knit-home-page="material"],
html[data-device="tablet"] .knit-home-deck__page[data-knit-home-page="material"],
html[data-device="phone"] .knit-home-deck__page[data-knit-home-page="news"],
html[data-device="tablet"] .knit-home-deck__page[data-knit-home-page="news"] {
  padding-left: max(var(--knit-page-pad-x), env(safe-area-inset-left, 0px));
  padding-right: max(var(--knit-page-pad-x), env(safe-area-inset-right, 0px));
}

html[data-device="phone"] #knitHomeDeck.is-dragging .knit-home-deck__page,
html[data-device="tablet"] #knitHomeDeck.is-dragging .knit-home-deck__page,
html[data-device="phone"] #knitHomeDeck.is-animating .knit-home-deck__page,
html[data-device="tablet"] #knitHomeDeck.is-animating .knit-home-deck__page {
  pointer-events: none;
  overflow: hidden;
}

html[data-device="phone"] #knitHomeDeck .knit-home-empty--idle,
html[data-device="tablet"] #knitHomeDeck .knit-home-empty--idle,
html.knit-h-page-swipe #knitHomeDeck .knit-home-empty,
html.knit-h-page-swipe #knitHomeDeck .knit-home-feed-more,
html.knit-h-page-swipe .knit-channel-pager__hint {
  display: none !important;
}

html[data-device="phone"] .knit-home-deck__page::-webkit-scrollbar,
html[data-device="tablet"] .knit-home-deck__page::-webkit-scrollbar {
  display: none;
}

html[data-device="phone"] #knitHomeDeck .knit-grid-sleeve,
html[data-device="tablet"] #knitHomeDeck .knit-grid-sleeve {
  padding-top: 0;
  padding-bottom: 0;
  min-height: 0;
  width: 100% !important;
}

html[data-device="phone"] #knitHomeDeck .knit-home-deck__page--follow,
html[data-device="tablet"] #knitHomeDeck .knit-home-deck__page--follow {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}

html[data-device="phone"] #knitHomeDeck #knitFollowView,
html[data-device="tablet"] #knitHomeDeck #knitFollowView {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-top: 0;
}

html[data-device="phone"] #knitHomeDeck .knit-grid--home-feed,
html[data-device="tablet"] #knitHomeDeck .knit-grid--home-feed {
  width: 100% !important;
  min-width: 0 !important;
}

html[data-device="phone"] .knit-imgsearch-query,
html[data-device="tablet"] .knit-imgsearch-query {
  font-size: 16px;
  margin-top: 0.55rem;
}

html[data-device="phone"] .knit-imgsearch-panel,
html[data-device="tablet"] .knit-imgsearch-panel {
  width: min(96vw, 640px);
  max-height: min(94dvh, 760px);
}