/* ============================================
   mTab Theme
   Primary #1664FF · BG #F6F8FA · Max 1200
   ============================================ */

:root {
  --primary: #1664FF;
  --primary-hover: #387BFF;
  --primary-strong: #0055FF;
  --primary-1: #F3F7FF;
  --primary-2: #EBF1FF;
  --primary-4: #6E9FFF;
  --primary-6: #1664FF;

  --bg-soft: #F6F8FA;
  --bg-white: #FFFFFF;
  --bg-4: #F6F8FA;

  --text-1: #0C0D0E;
  --text-2: #42464E;
  --text-3: #737A87;

  --border-2: #EAEDF1;
  --border-3: #D8DCE1;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-1: 0px 1px 2px 0px rgba(12, 13, 14, 0.05);
  --shadow-2: 0px 2px 6px 0px rgba(12, 13, 14, 0.08);
  --shadow-3: 0px 5px 15px 0px rgba(12, 13, 14, 0.08);

  --max-width: 1200px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --nav-h: 48px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; transition: color 150ms ease; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; vertical-align: middle; }
time { color: var(--text-3); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-3); border-radius: 3px; }

.mtab-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ========== TopNav ========== */
.mtab-header {
  height: var(--nav-h);
  background: var(--bg-white);
  box-shadow: var(--shadow-1);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.mtab-header-inner {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0;
}

.mtab-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--text-1);
}
.mtab-logo:hover { color: var(--text-1); }

.mtab-logo-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary-5, #387BFF), #1759DD);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-1);
  overflow: hidden;
  flex-shrink: 0;
}
.mtab-logo-icon:has(img) { background: transparent; box-shadow: none; }
.mtab-logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.mtab-logo-icon svg { display: block; }

.mtab-logo-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: 0.2px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mtab-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  margin-left: 40px;
  min-width: 0;
}

.mtab-nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.mtab-nav-list::-webkit-scrollbar { display: none; }

.mtab-nav-item { position: relative; height: 100%; }

.mtab-nav-link {
  height: var(--nav-h);
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-2);
  text-decoration: none;
  position: relative;
  transition: color 150ms ease;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: none;
  font-family: inherit;
}
.mtab-nav-link:hover { color: var(--primary); }
.mtab-nav-link.is-active {
  color: var(--primary);
  font-weight: 500;
}
.mtab-nav-link.is-active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

.mtab-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 140px;
  background: var(--bg-white);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-3);
  padding: 8px 3px 3px;
  list-style: none;
  margin: 0;
  z-index: 200;
  animation: mtabFade 150ms ease;
}
.mtab-nav-item:hover > .mtab-dropdown,
.mtab-nav-item.is-open > .mtab-dropdown { display: block; }

/* 用户芯片下拉：悬停或点击展开 */
.mtab-user-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 6px 0 2px;
  border-radius: 16px;
  cursor: pointer;
  transition: background 150ms ease;
  color: var(--text-1);
  font-size: 12px;
  font-weight: 500;
}
.mtab-user-chip:hover { background: var(--bg-4); }
.mtab-user-chip:hover .mtab-dropdown,
.mtab-user-chip.is-open .mtab-dropdown {
  display: block;
}
.mtab-user-chip .caret {
  color: var(--text-3);
  font-size: 10px;
  transition: transform 150ms ease;
}
.mtab-user-chip.is-open .caret { transform: rotate(180deg); }
.mtab-user-chip .mtab-dropdown {
  left: auto;
  right: 0;
  min-width: 132px;
}
.mtab-user-chip .mtab-dropdown li { list-style: none; }

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

.mtab-dropdown a {
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-1);
  white-space: nowrap;
}
.mtab-dropdown a:hover { background: var(--bg-4); color: var(--text-1); }
.mtab-dropdown .danger { color: #D7312A; }
.mtab-dropdown .danger:hover { background: #FDF5F5; color: #D7312A; }

.mtab-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

/* 顶栏搜索 */
.mtab-header-search {
  display: flex;
  align-items: center;
  height: 32px;
  background: var(--bg-4);
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 0 4px 0 12px;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  max-width: 180px;
}
.mtab-header-search:focus-within {
  background: var(--bg-white);
  border-color: var(--primary-hover);
  box-shadow: 0 0 0 2px var(--primary-2);
  max-width: 220px;
}
.mtab-header-search input {
  flex: 1;
  min-width: 0;
  height: 30px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-1);
  font-size: 13px;
  font-family: inherit;
  padding: 0 6px 0 0;
}
.mtab-header-search input::placeholder { color: var(--text-3); }
.mtab-header-search button {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.mtab-header-search button:hover {
  background: var(--primary-1);
  color: var(--primary);
}

@media (max-width: 720px) {
  .mtab-header-search {
    max-width: 120px;
    padding-left: 10px;
  }
  .mtab-header-search:focus-within { max-width: 150px; }
  .mtab-header-search input { font-size: 12px; }
}

.mtab-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.mtab-icon-btn:hover { background: var(--bg-4); color: var(--text-1); }

.mtab-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 150ms ease;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.mtab-nav-btn-text {
  color: var(--text-2);
  background: transparent;
}
.mtab-nav-btn-text:hover { color: var(--primary); background: var(--bg-4); }
.mtab-nav-btn-primary {
  color: #fff !important;
  background: var(--primary);
  box-shadow: var(--shadow-1);
}
.mtab-nav-btn-primary:hover,
.mtab-nav-btn-primary:focus,
.mtab-nav-btn-primary:focus-visible,
.mtab-nav-btn-primary:active {
  background: var(--primary-hover);
  color: #fff !important;
}

.mtab-user-chip:hover { background: var(--bg-4); }

.mtab-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-4);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border-2);
}
.mtab-avatar img { width: 100%; height: 100%; object-fit: cover; }

.mtab-user-name {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mtab-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  margin-left: 8px;
}
.mtab-nav-toggle span {
  display: block;
  height: 2px;
  width: 18px;
  margin: 0 auto;
  background: var(--text-2);
  border-radius: 1px;
}

/* ========== Page shell ========== */
.mtab-main {
  flex: 1 0 auto;
  width: 100%;
  /* 只改上下，避免覆盖 .mtab-container 的左右 padding */
  padding-top: 32px;
  padding-bottom: 40px;
  box-sizing: border-box;
}

.mtab-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: start;
}
.mtab-layout-has-side { grid-template-columns: 1fr 300px; }
.mtab-content { min-width: 0; }

/* ========== Hero（首页） ========== */
.mtab-hero {
  background: linear-gradient(135deg, #1759DD 0%, #387BFF 60%, #6E9FFF 100%);
  color: #fff;
  padding: 40px 0;
  position: relative;
  overflow: hidden;
}
.mtab-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.mtab-hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: 10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.mtab-hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.mtab-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  font-size: 12px;
  margin-bottom: 16px;
}
.mtab-hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8dd8b3;
}
.mtab-hero-title {
  font-size: 28px;
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 12px;
  color: #fff;
}
.mtab-hero-subtitle {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.88;
  margin: 0 0 20px;
  max-width: 520px;
}
.mtab-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: all 150ms ease;
}
.mtab-hero-cta-primary {
  background: #fff;
  color: var(--primary) !important;
  box-shadow: var(--shadow-2);
}
.mtab-hero-cta-primary:hover,
.mtab-hero-cta-primary:focus,
.mtab-hero-cta-primary:active {
  color: var(--primary-strong) !important;
  transform: translateY(-1px);
  outline: none;
}
.mtab-hero-cta-ghost {
  background: rgba(255,255,255,0.12);
  color: #fff !important;
  margin-left: 10px;
  border: 1px solid rgba(255,255,255,0.3);
}
.mtab-hero-cta-ghost:hover,
.mtab-hero-cta-ghost:focus,
.mtab-hero-cta-ghost:active {
  background: rgba(255,255,255,0.2);
  color: #fff !important;
  outline: none;
}

/* Hero 右侧装饰卡片 */
.mtab-hero-cards {
  position: relative;
  width: 280px;
  height: 250px;
  flex-shrink: 0;
  margin-left: auto;
  display: block;
}
.mtab-hero-card {
  position: absolute;
  width: 170px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(12, 13, 14, 0.18);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255,255,255,0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.mtab-hero-card:hover {
  z-index: 5;
  box-shadow: 0 16px 40px rgba(12, 13, 14, 0.22);
}
.mtab-hero-card-0 {
  right: 0;
  top: 18px;
  z-index: 3;
  transform: rotate(3deg);
}
.mtab-hero-card-1 {
  right: 70px;
  top: 46px;
  z-index: 2;
  transform: rotate(-6deg);
  opacity: 0.96;
}
.mtab-hero-card-2 {
  right: 130px;
  top: 8px;
  z-index: 1;
  transform: rotate(-12deg);
  opacity: 0.88;
  width: 156px;
}
.mtab-hero-card-0:hover { transform: rotate(2deg) translateY(-4px); }
.mtab-hero-card-1:hover { transform: rotate(-5deg) translateY(-4px); }
.mtab-hero-card-2:hover { transform: rotate(-11deg) translateY(-4px); }

.mtab-hero-card-cover {
  height: 114px;
  background: linear-gradient(135deg, #F3F7FF 0%, #EBF1FF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--primary);
}
.mtab-hero-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mtab-hero-card-cover-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  opacity: 0.7;
}
.mtab-hero-card-body { padding: 10px 12px 12px; }
.mtab-hero-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.mtab-hero-card-title {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.mtab-hero-card-tag {
  flex-shrink: 0;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--bg-4);
  color: var(--text-2);
  font-size: 10px;
  line-height: 18px;
}
.mtab-hero-card-desc {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mtab-hero-card-divider {
  height: 1px;
  background: var(--border-2);
  margin: 8px 0;
}
.mtab-hero-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.mtab-hero-card-author {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.mtab-hero-card-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #387BFF, #B3CCFF);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mtab-hero-card-name {
  font-size: 10px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mtab-hero-card-meta {
  font-size: 10px;
  color: var(--text-3);
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .mtab-hero-cards { display: none; }
  .mtab-hero-inner { justify-content: flex-start; }
}

/* ========== Category chips ========== */
.mtab-chips-block { margin-bottom: 20px; }
.mtab-chips-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.mtab-chips-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0;
}
.mtab-chips-hint {
  font-size: 12px;
  color: var(--text-3);
}
.mtab-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mtab-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-3);
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all 150ms ease;
  font-family: inherit;
  text-decoration: none;
}
.mtab-chip:hover {
  border-color: var(--primary-4);
  color: var(--primary);
  background: var(--primary-1);
}
.mtab-chip.is-active {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px rgba(22, 100, 255, 0.28);
}
.mtab-chip.is-active:hover { color: #fff; }
.mtab-chip-count {
  opacity: 0.8;
  font-size: 11px;
}

/* ========== Toolbar search ========== */
.mtab-toolbar {
  background: var(--bg-white);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.mtab-toolbar-search {
  flex: 1;
  min-width: 280px;
  display: flex;
  align-items: center;
  background: var(--bg-4);
  border-radius: var(--radius-md);
  padding: 0 0 0 12px;
  transition: all 150ms ease;
}
.mtab-toolbar-search:focus-within {
  background: var(--bg-white);
  box-shadow: 0 0 0 1px var(--primary-2);
}
.mtab-toolbar-search .search-icon {
  color: var(--text-3);
  flex-shrink: 0;
  display: flex;
}
.mtab-toolbar-search input {
  flex: 1;
  height: 40px;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 8px;
  font-size: 14px;
  color: var(--text-1);
  font-family: inherit;
  min-width: 0;
}
.mtab-toolbar-search input::placeholder { color: var(--text-3); }
.mtab-search-btn {
  height: 40px;
  padding: 0 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  border: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
  flex-shrink: 0;
  font-family: inherit;
}
.mtab-search-btn:hover { box-shadow: 0 4px 14px rgba(22, 100, 255, 0.3); }

/* ========== Section title ========== */
.mtab-section-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 8px 0 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.mtab-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
  position: relative;
  padding-left: 12px;
}
.mtab-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 16px;
  margin-top: -8px;
  background: linear-gradient(180deg, var(--primary), var(--primary-4));
  border-radius: 2px;
}
.mtab-section-count {
  font-size: 12px;
  color: var(--text-3);
  background: var(--bg-4);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

/* ========== 首页文章网格（与个人中心独立） ========== */
.mtab-posts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1100px) {
  .mtab-posts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .mtab-posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 通用卡片网格基类（个人中心等用；列数由各自作用域覆盖） */
.mtab-skill-grid {
  display: grid;
  gap: 16px;
}

/* 个人中心：我的文章 / 投稿管理 — 独立列数，不受首页 4 列限制 */
.profile-content .mtab-skill-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1100px) {
  .profile-content .mtab-skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .profile-content .mtab-skill-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.mtab-skill-card {
  background: var(--bg-white);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
  display: flex;
  flex-direction: column;
}
.mtab-skill-card:hover {
  border-color: var(--primary-4);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}
/* 个人中心卡片：不整卡跳转 */
.mtab-skill-card-static { cursor: default; }
.mtab-skill-card-static:hover { transform: none; }
.mtab-skill-card-static .mtab-skill-cover { cursor: pointer; }
.mtab-skill-card-clickable { cursor: pointer; }
.mtab-skill-card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--primary-4);
}
.mtab-skill-card-clickable .mtab-skill-title a {
  color: inherit;
  text-decoration: none;
}
.uc-inline-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}
.uc-inline-form .mtab-reply-btn.uc-danger {
  color: #c43138;
  font-size: 11px;
  padding: 0;
}
.uc-inline-form .mtab-reply-btn.uc-danger:hover {
  color: #a01f1a;
  text-decoration: underline;
}
/* 个人中心卡片底部信息行 */
.uc-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  min-width: 0;
}
.uc-stats-left {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  flex-wrap: wrap;
}
.uc-stats-left .mtab-stat-item {
  margin: 0;
}
.uc-stats-left .mtab-stat-item + .mtab-stat-item {
  margin-left: 6px;
}
.uc-stats-row .uc-inline-form {
  flex-shrink: 0;
  margin-left: auto;
}
.uc-list-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.uc-filter-tabs .mtab-section-count {
  margin-left: auto;
}
.uc-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.uc-card-actions .mtab-btn {
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
}

.mtab-skill-cover {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--primary-1) 0%, var(--primary-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  overflow: hidden;
  position: relative;
}
.mtab-skill-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.mtab-skill-cover img.mtab-cover-default {
  object-fit: cover;
  opacity: 1;
}
.mtab-skill-card:hover .mtab-skill-cover img { transform: scale(1.04); }
.mtab-skill-cover-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.mtab-skill-cover-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 10px;
  background: rgba(22, 100, 255, 0.1);
  border-radius: 999px;
  color: var(--primary);
  letter-spacing: 0;
}

.mtab-skill-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}

.mtab-skill-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.mtab-skill-title {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  margin: 0;
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.mtab-skill-title a { color: inherit; }
.mtab-skill-title a:hover { color: var(--primary); }

.mtab-skill-desc {
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
  margin: 0;
}
.mtab-skill-desc p { margin: 0; }
.mtab-skill-desc img { display: none; }

.mtab-skill-divider {
  height: 1px;
  background: var(--border-2);
  margin: 8px 0 0;
}

.mtab-skill-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
  margin-top: auto;
}

.mtab-skill-author {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.mtab-skill-author .mtab-avatar { width: 24px; height: 24px; font-size: 10px; }
.mtab-skill-author-name {
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mtab-skill-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.mtab-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--text-3);
  font-size: 12px;
}

.mtab-badge-top {
  display: inline-block;
  flex-shrink: 0;
  height: 18px;
  line-height: 18px;
  padding: 0 6px;
  background: var(--primary-2);
  color: var(--primary-strong);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 500;
}

.mtab-chip-inline {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-4);
  border: 1px solid var(--border-2);
  font-size: 11px;
  color: var(--text-3);
  text-decoration: none;
}
.mtab-chip-inline:hover {
  border-color: var(--primary-4);
  color: var(--primary);
  background: var(--primary-1);
}

.mtab-tag {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--bg-4);
  border: 1px solid var(--border-2);
  font-size: 12px;
  color: var(--text-2);
  text-decoration: none;
}
.mtab-tag:hover {
  border-color: var(--primary-4);
  color: var(--primary);
  background: var(--primary-1);
}

.mtab-dot { opacity: 0.4; margin: 0 2px; }

/* Empty */
.mtab-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  background: var(--bg-white);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  color: var(--text-3);
  text-align: center;
}
.mtab-empty h3 { margin: 4px 0 4px; font-size: 16px; color: var(--text-2); font-weight: 600; }
.mtab-empty p { margin: 0 0 16px; font-size: 13px; }
.mtab-empty-img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin-bottom: 4px;
  user-select: none;
  pointer-events: none;
}

/* ========== Pagination ========== */
.mtab-pagination {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.mtab-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-2);
  background: var(--bg-white);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}
.mtab-pagination a:hover {
  border-color: var(--primary-4);
  color: var(--primary);
  background: var(--primary-1);
}
/* 当前页：必须有 class="current" */
.mtab-pagination .current,
.mtab-pagination span.current,
.mtab-pagination a.current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--primary);
  background: var(--primary) !important;
  color: #fff !important;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(22, 100, 255, 0.25);
  cursor: default;
  pointer-events: none;
}
.mtab-pagination em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 34px;
  color: var(--text-3);
  font-style: normal;
  font-size: 12px;
  padding: 0 2px;
}
.mtab-pagination .current,
.mtab-pagination .page-numbers.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* ========== Detail card ========== */
.mtab-card {
  background: var(--bg-white);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-1);
}
.mtab-card:last-child { margin-bottom: 0; }

.mtab-detail-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.mtab-detail-cover {
  width: 165px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-2);
  background: linear-gradient(135deg, var(--primary-1), var(--primary-2));
}
.mtab-detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mtab-detail-info { flex: 1; min-width: 0; }

.mtab-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}
.mtab-breadcrumb a { color: var(--text-3); }
.mtab-breadcrumb a:hover { color: var(--primary); }
.mtab-breadcrumb .sep { color: var(--border-3); }
.mtab-breadcrumb .current {
  color: var(--text-1);
  font-weight: 500;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mtab-detail-title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.01em;
}

.mtab-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 12px;
}
.mtab-detail-meta a { color: var(--text-2); }
.mtab-detail-meta a:hover { color: var(--primary); }
.mtab-detail-meta .mtab-avatar { width: 22px; height: 22px; font-size: 10px; }

.mtab-detail-desc {
  font-size: 13px;
  color: var(--text-2);
  margin: 0 0 8px;
  line-height: 1.7;
}

/* ========== Markdown 正文 ========== */
.mtab-article-body,
.markdown {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-1);
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow-x: hidden;
}
.mtab-article-body > :first-child,
.markdown > :first-child { margin-top: 0 !important; }
.mtab-article-body > :last-child,
.markdown > :last-child { margin-bottom: 0 !important; }

/* 标题 */
.mtab-article-body h1,
.mtab-article-body h2,
.mtab-article-body h3,
.mtab-article-body h4,
.mtab-article-body h5,
.mtab-article-body h6,
.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
  margin: 1.75em 0 0.75em;
  line-height: 1.35;
  font-weight: 650;
  color: var(--text-1);
  letter-spacing: -0.01em;
}
.mtab-article-body h1,
.markdown h1 { font-size: 1.45rem; padding-bottom: 0.35em; border-bottom: 1px solid var(--border-2); }
.mtab-article-body h2,
.markdown h2 {
  font-size: 1.3rem;
  padding-left: 12px;
  position: relative;
}
.mtab-article-body h2::before,
.markdown h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--primary-4));
}
.mtab-article-body h3,
.markdown h3 { font-size: 1.12rem; }
.mtab-article-body h4,
.markdown h4 { font-size: 1rem; color: var(--text-2); }
.mtab-article-body h5,
.markdown h5,
.mtab-article-body h6,
.markdown h6 { font-size: 0.92rem; color: var(--text-3); }

/* 段落与强调 */
.mtab-article-body p,
.markdown p { margin: 0 0 1.1em; }
.mtab-article-body strong,
.markdown strong { font-weight: 650; color: var(--text-1); }
.mtab-article-body del,
.markdown del { color: var(--text-3); }
.mtab-article-body em,
.markdown em { font-style: italic; }

/* 链接 */
.mtab-article-body a,
.markdown a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.mtab-article-body a:hover,
.markdown a:hover {
  color: var(--primary-hover);
  border-bottom-color: var(--primary-hover);
}

/* 列表：留足序号空间，避免 10/99 等被裁切 */
.mtab-article-body ul,
.markdown ul {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
}
.mtab-article-body ol,
.markdown ol {
  margin: 0 0 1.1em;
  /* 覆盖两位数以上序号；嵌套时再加大 */
  padding-left: 2.1em;
}
.mtab-article-body li,
.markdown li { margin: 0.35em 0; }
.mtab-article-body li > p,
.markdown li > p { margin-bottom: 0.4em; }
.mtab-article-body li::marker,
.markdown li::marker {
  color: var(--primary);
  font-weight: 500;
}
.mtab-article-body ul ul,
.markdown ul ul,
.mtab-article-body ul ol,
.markdown ul ol {
  margin-top: 0.3em;
  margin-bottom: 0.3em;
  padding-left: 1.6em;
}
.mtab-article-body ol ul,
.markdown ol ul,
.mtab-article-body ol ol,
.markdown ol ol {
  margin-top: 0.3em;
  margin-bottom: 0.3em;
  padding-left: 1.85em;
}

/* 引用 */
.mtab-article-body blockquote,
.markdown blockquote {
  margin: 1.25em 0;
  padding: 12px 16px;
  border-left: 3px solid var(--primary);
  background: var(--primary-1);
  color: var(--text-2);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.95em;
}
.mtab-article-body blockquote p:last-child,
.markdown blockquote p:last-child { margin-bottom: 0; }
.mtab-article-body blockquote > :first-child,
.markdown blockquote > :first-child { margin-top: 0; }

/* 行内代码 */
.mtab-article-body code,
.markdown code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}
.mtab-article-body :not(pre) > code,
.markdown :not(pre) > code {
  background: var(--primary-1);
  border: 1px solid var(--primary-2);
  padding: 0.15em 0.45em;
  border-radius: 5px;
  color: var(--primary-strong);
  word-break: break-word;
}

/* ========== 代码块 · GitHub Dark（强制覆盖 prettyprint 浅色） ========== */
.mtab-article-body pre,
.mtab-article-body pre.prettyprint,
.markdown pre,
.markdown pre.prettyprint,
.mtab-article-body div.prettyprint,
.markdown div.prettyprint {
  margin: 1.25em 0 !important;
  padding: 16px 18px !important;
  background: #0d1117 !important;
  color: #e6edf3 !important;
  border-radius: 10px !important;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace !important;
  font-size: 13px !important;
  line-height: 1.65 !important;
  border: 1px solid #30363d !important;
  position: relative;
  box-shadow: none !important;
  white-space: pre !important;
  tab-size: 4;
}
.mtab-article-body pre code,
.markdown pre code,
.mtab-article-body pre.prettyprint code,
.markdown pre.prettyprint code,
.mtab-article-body div.prettyprint code,
.markdown div.prettyprint code {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
  white-space: pre !important;
  display: block;
  min-width: 0;
  font-family: inherit !important;
}

/* 语言角标：正式站 prettyprint 会叠加异常角标，统一隐藏 */
.mtab-article-body pre[data-lang]::before,
.markdown pre[data-lang]::before,
.mtab-article-body div.prettyprint::before,
.markdown div.prettyprint::before,
.mtab-article-body pre.prettyprint::before,
.markdown pre.prettyprint::before {
  display: none !important;
  content: none !important;
}
/* 隐藏 prettyprint / 插件自带的语言名角标 */
.mtab-article-body .prettyprint .lang,
.markdown .prettyprint .lang,
.mtab-article-body pre .lang,
.markdown pre .lang,
.mtab-article-body .prettyprint .language,
.markdown .prettyprint .language,
.mtab-article-body .prettyprint > .prettyprint-annotation,
.markdown .prettyprint > .prettyprint-annotation,
.mtab-article-body .prettyprint-annotation {
  display: none !important;
}

/* 行号 */
.mtab-article-body pre.prettyprint .linenums,
.markdown pre.prettyprint .linenums {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  counter-reset: linenums;
}
.mtab-article-body pre.prettyprint .linenums li,
.markdown pre.prettyprint .linenums li {
  margin: 0 !important;
  padding: 0 0 0 2.2em !important;
  position: relative;
  min-height: 1.6em;
  color: #e6edf3 !important;
}
.mtab-article-body pre.prettyprint .linenums li:before,
.markdown pre.prettyprint .linenums li:before {
  content: counter(linenums);
  counter-increment: linenums;
  position: absolute;
  left: 0;
  width: 1.8em;
  text-align: right;
  color: #484f58 !important;
  user-select: none;
}

/* GitHub Dark · prettyprint / hljs token（在深底上保证可读） */
.mtab-article-body .prettyprint .com,
.markdown .prettyprint .com,
.mtab-article-body .prettyprint .comment,
.markdown .prettyprint .comment,
.mtab-article-body pre .hljs-comment,
.markdown pre .hljs-comment,
.mtab-article-body pre .hljs-quote {
  color: #8b949e !important;
  font-style: italic;
}
.mtab-article-body .prettyprint .kwd,
.markdown .prettyprint .kwd,
.mtab-article-body .prettyprint .keyword,
.markdown .prettyprint .keyword,
.mtab-article-body pre .hljs-keyword,
.mtab-article-body pre .hljs-selector-tag {
  color: #ff7b72 !important;
}
.mtab-article-body .prettyprint .str,
.markdown .prettyprint .str,
.mtab-article-body .prettyprint .typ,
.markdown .prettyprint .typ,
.mtab-article-body .prettyprint .lit,
.markdown .prettyprint .lit,
.mtab-article-body pre .hljs-string,
.mtab-article-body pre .hljs-title,
.mtab-article-body pre .hljs-section {
  color: #a5d6ff !important;
}
.mtab-article-body .prettyprint .num,
.markdown .prettyprint .num,
.mtab-article-body pre .hljs-number,
.mtab-article-body pre .hljs-literal,
.mtab-article-body pre .hljs-built_in {
  color: #79c0ff !important;
}
.mtab-article-body .prettyprint .fun,
.markdown .prettyprint .fun,
.mtab-article-body pre .hljs-function,
.mtab-article-body pre .hljs-title.function_ {
  color: #d2a8ff !important;
}
.mtab-article-body .prettyprint .atn,
.markdown .prettyprint .atn,
.mtab-article-body .prettyprint .atv,
.markdown .prettyprint .atv,
.mtab-article-body pre .hljs-attr,
.mtab-article-body pre .hljs-attribute,
.mtab-article-body pre .hljs-variable {
  color: #79c0ff !important;
}
.mtab-article-body .prettyprint .tag,
.markdown .prettyprint .tag,
.mtab-article-body pre .hljs-tag {
  color: #7ee787 !important;
}
.mtab-article-body .prettyprint .pun,
.markdown .prettyprint .pun,
.mtab-article-body .prettyprint .opn,
.markdown .prettyprint .opn {
  color: #c9d1d9 !important;
}
/* 未分类代码文本保持浅色，避免深底黑字 */
.mtab-article-body pre.prettyprint .pln,
.markdown pre.prettyprint .pln {
  color: #e6edf3 !important;
}

/* 表格 */
.mtab-article-body .hljs-doctag,
.markdown .hljs-doctag,
.mtab-article-body .hljs-meta,
.markdown .hljs-meta {
  color: #8b949e;
}
.mtab-article-body .hljs-emphasis,
.markdown .hljs-emphasis {
  font-style: italic;
}
.mtab-article-body .hljs-strong,
.markdown .hljs-strong {
  font-weight: 600;
}

/* 表格 */
.mtab-article-body table,
.markdown table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25em 0;
  font-size: 13px;
  line-height: 1.55;
  display: block;
  overflow-x: auto;
}
.mtab-article-body th,
.markdown th {
  background: var(--bg-4);
  border: 1px solid var(--border-2);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
}
.mtab-article-body td,
.markdown td {
  border: 1px solid var(--border-2);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  color: var(--text-2);
}
.mtab-article-body tbody tr:nth-child(even),
.markdown tbody tr:nth-child(even) { background: rgba(246, 248, 250, 0.65); }
.mtab-article-body tbody tr:hover,
.markdown tbody tr:hover { background: var(--primary-1); }

/* 图片 */
.mtab-article-body img,
.markdown img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 0.75em 0;
  border: 1px solid var(--border-2);
  background: var(--bg-4);
  display: block;
}
.mtab-article-body a img,
.markdown a img {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.mtab-article-body a:hover img,
.markdown a:hover img {
  box-shadow: 0 4px 16px rgba(12, 13, 14, 0.1);
}

/* 分割线 */
.mtab-article-body hr,
.markdown hr {
  border: none;
  height: 1px;
  background: var(--border-2);
  margin: 2em auto;
  width: 100%;
}

/* 任务列表兼容 */
.mtab-article-body input[type="checkbox"],
.markdown input[type="checkbox"] {
  margin-right: 6px;
  accent-color: var(--primary);
}

/* 段落内连续图片间距优化 */
.mtab-article-body p img:only-child,
.markdown p img:only-child { margin-left: auto; margin-right: auto; }

.mtab-article-tags { margin-top: 16px; }

/* 详情页：标题+元信息+正文合并 */
.mtab-article-merged {
  padding: 28px 32px 24px;
}
.mtab-article-merged-header {
  margin-bottom: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-2);
}
.mtab-article-merged-body {
  margin-top: 20px;
}
@media (max-width: 600px) {
  .mtab-article-merged {
    padding: 20px 16px;
  }
}

/* Neighbors：上一篇固定左，下一篇固定右 */
.mtab-neighbors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
  align-items: stretch;
}
.mtab-neighbor-slot {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.mtab-neighbor-slot.mtab-neighbor-prev {
  align-items: stretch;
  justify-content: flex-start;
}
.mtab-neighbor-slot.mtab-neighbor-next {
  align-items: stretch;
  justify-content: flex-end;
}
.mtab-neighbor {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  background: var(--bg-4);
  color: var(--text-1);
  transition: border-color 150ms ease;
  text-decoration: none;
  box-sizing: border-box;
}
.mtab-neighbor:hover { border-color: var(--primary-4); color: var(--text-1); }
.mtab-neighbor-slot.mtab-neighbor-next .mtab-neighbor {
  text-align: right;
  align-items: flex-end;
}
.mtab-neighbor-label { font-size: 11px; color: var(--text-3); }
.mtab-neighbor-title {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* ========== Comments ========== */
.mtab-comments-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}
.mtab-comments-head .mtab-section-title { margin: 0; }
.mtab-comments-count {
  font-size: 12px;
  color: var(--text-3);
  background: var(--bg-4);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.mtab-comment-form { margin-bottom: 20px; }
.mtab-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.mtab-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  background: var(--bg-white);
  color: var(--text-1);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  line-height: 34px;
  box-sizing: border-box;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  resize: none;
}
.mtab-input:focus {
  border-color: var(--primary-hover);
  box-shadow: 0 0 0 3px var(--primary-2);
}
.mtab-input:disabled {
  background: var(--bg-4);
  color: var(--text-3);
  cursor: not-allowed;
}
.mtab-textarea {
  height: auto;
  min-height: 96px;
  line-height: 1.6;
  padding: 10px 12px;
  resize: none;
  overflow: auto;
}

/* 密码框 + 眼睛 */
.mtab-pw-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.mtab-pw-wrap .mtab-input {
  width: 100%;
  padding-right: 36px;
}
.mtab-pw-eye {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: color 0.15s ease, background 0.15s ease;
}
.mtab-pw-eye:hover {
  color: var(--primary);
  background: var(--bg-4);
}
.mtab-pw-eye .icon-eye-off { display: none; }
.mtab-pw-eye.is-visible .icon-eye { display: none; }
.mtab-pw-eye.is-visible .icon-eye-off { display: block; }

.mtab-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.mtab-login-tip { margin: 0; color: var(--text-3); font-size: 13px; }

.mtab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff !important;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease, color 150ms ease;
  text-decoration: none;
}
.mtab-btn:hover,
.mtab-btn:focus,
.mtab-btn:focus-visible,
.mtab-btn:active {
  background: var(--primary-hover);
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(22,100,255,0.25);
  outline: none;
}
.mtab-btn-ghost {
  background: transparent;
  color: var(--text-3) !important;
  border: 1px solid var(--border-2);
}
.mtab-btn-ghost:hover,
.mtab-btn-ghost:focus,
.mtab-btn-ghost:focus-visible,
.mtab-btn-ghost:active {
  background: var(--bg-4);
  color: var(--text-1) !important;
  box-shadow: none;
  border-color: var(--border-3);
}

.mtab-comment {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-2);
}
.mtab-comment:last-child { border-bottom: none; padding-bottom: 0; }
.mtab-comment-child {
  margin-left: 38px;
  padding-top: 10px;
  border-bottom: none;
}
.mtab-comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--bg-4);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  border: 1px solid var(--border-2);
}
.mtab-comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mtab-comment-body { flex: 1; min-width: 0; }
.mtab-comment-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 4px;
}
.mtab-comment-meta a { color: var(--text-1); font-weight: 600; }
.mtab-comment-meta time { font-size: 12px; color: var(--text-3); }
.mtab-comment-content {
  font-size: 13px;
  color: var(--text-2);
  word-wrap: break-word;
  line-height: 1.7;
}
.mtab-comment-actions { margin-top: 4px; }
.mtab-reply-btn {
  border: none;
  background: none;
  padding: 0;
  color: var(--text-3);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.mtab-reply-btn:hover { color: var(--primary); }
.mtab-comment-page { margin-top: 12px; font-size: 12px; }

/* ========== Sidebar widgets ========== */
.mtab-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}

.mtab-widget {
  background: var(--bg-white);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-1);
}
.mtab-widget-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  position: relative;
  padding-left: 10px;
}
.mtab-widget-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 12px;
  margin-top: -6px;
  background: var(--primary);
  border-radius: 2px;
}
.mtab-widget-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mtab-widget-list li {
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px dashed transparent;
}
.mtab-widget-list a { color: var(--text-2); }
.mtab-widget-list a:hover { color: var(--primary); }

/* 详情页相关推荐 */
.mtab-rec-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mtab-rec-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.mtab-rec-cover {
  width: 72px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--primary-1);
  display: block;
}
.mtab-rec-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.mtab-rec-item:hover .mtab-rec-cover img { transform: scale(1.06); }
.mtab-rec-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mtab-rec-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
}
.mtab-rec-title:hover { color: var(--primary); }
.mtab-rec-meta {
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 4px;
}
.mtab-widget-empty {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
  padding: 8px 0;
}

.mtab-widget-sub {
  list-style: none;
  margin: 4px 0 0;
  padding: 0 0 0 12px;
}
.mtab-widget-sub a { font-size: 12px; color: var(--text-3) !important; }
.mtab-count {
  float: right;
  color: var(--text-3);
  font-size: 12px;
}
.mtab-widget-blogger { text-align: center; }
.mtab-blogger-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  border: 2px solid var(--border-2);
}
.mtab-blogger-name { font-weight: 600; margin-bottom: 4px; color: var(--text-1); font-size: 14px; }
.mtab-blogger-desc { font-size: 12px; color: var(--text-3); }
.mtab-tag-cloud { display: flex; flex-wrap: wrap; gap: 4px; }

/* ========== Element 风格 Select（自定义下拉面板） ========== */
.mtab-select-wrap {
  --sel-h: 40px;
  --sel-radius: 8px;
  --sel-font: 13px;
  --sel-pad-x: 12px;
  --sel-arrow-w: 36px;
  --sel-opt-h: 36px;
  --sel-panel-pad: 6px;
  --sel-opt-radius: 8px;
  --sel-border: var(--border-2);
  position: relative;
  width: 100%;
  display: block;
  font-size: var(--sel-font);
}
.mtab-select-wrap.is-small {
  --sel-h: 36px;
  --sel-font: 13px;
  --sel-pad-x: 12px;
  --sel-arrow-w: 32px;
  --sel-opt-h: 36px;
  --sel-panel-pad: 6px;
  --sel-opt-radius: 8px;
}

.mtab-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: var(--sel-h);
  padding: 0 calc(var(--sel-arrow-w) + 4px) 0 var(--sel-pad-x);
  border: 1px solid var(--sel-border, var(--border-2));
  border-radius: var(--sel-radius);
  background-color: var(--bg-white, #fff);
  color: var(--text-1, #0c0d0e);
  font-size: var(--sel-font);
  line-height: calc(var(--sel-h) - 2px);
  font-family: inherit;
  text-align: left;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1),
              box-shadow 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  box-sizing: border-box;
  box-shadow: none;
  resize: none;
}
.mtab-select:hover {
  border-color: var(--primary-hover, #387bff);
}
.mtab-select:focus,
.mtab-select:focus-visible,
.mtab-select-wrap.is-open > .mtab-select {
  border-color: var(--primary, #1664ff);
  box-shadow: 0 0 0 2px var(--primary-2, #ebf1ff);
}
.mtab-select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-weight: 400;
}
.mtab-select-wrap.is-placeholder .mtab-select-value {
  color: #a8abb2;
}
.mtab-select-wrap.is-disabled .mtab-select {
  background-color: var(--bg-4, #f5f7fa);
  color: #c0c4cc;
  cursor: not-allowed;
  border-color: var(--border-2, #e4e7ed);
}
.mtab-select-wrap.is-disabled .mtab-select:hover {
  border-color: var(--border-2, #e4e7ed);
  box-shadow: none;
}

.mtab-select-arrow {
  position: absolute;
  top: 0;
  right: 1px;
  width: var(--sel-arrow-w);
  height: var(--sel-h);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c0c4cc;
  pointer-events: none;
  transition: color 0.2s, transform 0.2s;
}
.mtab-select:hover .mtab-select-arrow {
  color: var(--primary-hover, #387bff);
}
.mtab-select-wrap.is-open .mtab-select-arrow,
.mtab-select-wrap:focus-within .mtab-select-arrow {
  color: var(--primary, #1664ff);
  transform: rotate(180deg);
}
.mtab-select-wrap.is-disabled .mtab-select-arrow {
  color: #c0c4cc;
}

/* 下拉面板：与选项留出外边距 */
.mtab-select-dropdown {
  position: absolute;
  z-index: 220;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--bg-white, #fff);
  border: 1px solid var(--border-2, #eaedf1);
  border-radius: var(--sel-radius);
  box-shadow: 0 6px 20px rgba(12, 13, 14, 0.1), 0 0 0 1px rgba(12, 13, 14, 0.02);
  max-height: 280px;
  overflow: auto;
  animation: mtabSelectIn 0.15s ease;
}
.mtab-select-dropdown[hidden] { display: none !important; }

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

/* 面板内边距层：选项与面板边缘保持间距 */
.mtab-select-dropdown-inner {
  margin: var(--sel-panel-pad);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mtab-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: var(--sel-opt-h);
  padding: 0 12px;
  border: none;
  border-radius: var(--sel-opt-radius);
  background: transparent;
  color: var(--text-1, #0c0d0e);
  font-size: var(--sel-font);
  font-family: inherit;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease;
  box-sizing: border-box;
}
.mtab-select-option-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mtab-select-check {
  flex-shrink: 0;
  opacity: 0;
  color: var(--primary, #1664ff);
  transition: opacity 0.15s ease;
}
.mtab-select-option:hover {
  background: var(--bg-4, #f5f7fa);
  color: var(--text-1, #0c0d0e);
}
/* 选中：背景 + 主题色 + 勾 */
.mtab-select-option.is-selected {
  background: var(--primary-2, #ebf1ff);
  color: var(--primary, #1664ff);
  font-weight: 500;
}
.mtab-select-option.is-selected .mtab-select-check {
  opacity: 1;
}
.mtab-select-option.is-selected:hover {
  background: var(--primary-1, #f3f7ff);
  color: var(--primary, #1664ff);
}

/* 面板贴近底部时向上展开 */
.mtab-select-dropdown.is-drop-up {
  top: auto;
  bottom: calc(100% + 6px);
}

.mtab-widget-search { max-width: none; }
.mtab-widget-comments .mtab-meta,
.mtab-widget-twitters .mtab-meta {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}
.mtab-widget-twitters li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-2);
}
.mtab-widget-twitters li:last-child { border-bottom: none; }

/* ========== Footer ========== */
.mtab-footer {
  border-top: 1px solid var(--border-2);
  padding: 16px 0;
  background: var(--bg-white);
  margin-top: auto;
  flex-shrink: 0;
}
.mtab-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.mtab-footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.mtab-footer-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
}
.mtab-footer-logo svg { color: var(--primary); }
.mtab-footer-left .mtab-logo { color: var(--text-1); }
.mtab-footer-left .mtab-logo-text {
  font-size: 14px;
  font-weight: 500;
  max-width: none;
}
.mtab-footer-left .mtab-logo-icon {
  width: 20px !important;
  height: 20px !important;
}
.mtab-footer-copy {
  font-size: 12px;
  color: var(--text-3);
}
.mtab-footer-copy a { color: var(--text-3); }
.mtab-footer-copy a:hover { color: var(--primary); }
.mtab-footer-extra {
  margin-top: 8px;
  width: 100%;
  font-size: 12px;
  color: var(--text-3);
}

/* Back top */
.mtab-back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--bg-white);
  color: var(--text-2);
  box-shadow: var(--shadow-3);
  border: 1px solid var(--border-2);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  transition: all 150ms ease;
}
.mtab-back-top.is-show { display: inline-flex; }
.mtab-back-top:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(22, 100, 255, 0.3);
}

/* ========== 404 ========== */
.mtab-body-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  background: var(--bg-soft);
}
.mtab-404-card {
  text-align: center;
  padding: 48px 40px;
  background: var(--bg-white);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  max-width: 420px;
}
.mtab-404-code {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  color: var(--primary);
  opacity: 0.15;
  letter-spacing: -0.04em;
}
.mtab-404-msg {
  margin: 12px 0 24px;
  color: var(--text-3);
  font-size: 14px;
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .mtab-layout-has-side { grid-template-columns: 1fr; }
  .mtab-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
  }
  .mtab-detail-header { flex-direction: column; }
  .mtab-detail-cover { width: 100%; max-width: 280px; height: 160px; }
}

@media (max-width: 768px) {
  /* 手机顶栏：菜单图标居左 + 站名，不显示 LOGO 图 */
  .mtab-header-inner {
    gap: 6px;
    padding: 0 12px;
  }
  .mtab-logo {
    order: 2;
    flex-shrink: 1;
    min-width: 0;
  }
  .mtab-logo-icon { display: none; }
  .mtab-logo-text {
    font-size: 15px;
    max-width: 110px;
  }
  .mtab-nav-toggle {
    display: flex;
    order: 1;
    margin-left: 0;
    flex-shrink: 0;
  }
  .mtab-header-actions {
    order: 3;
    margin-left: auto;
    flex-shrink: 1;
  }

  /* 展开菜单：固定在顶栏下方，精致白底面板 */
  .mtab-nav {
    display: none;
  }
  .mtab-nav.is-open {
    display: block;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    height: auto;
    background: #ffffff;
    border-bottom: 1px solid var(--border-2);
    padding: 8px 12px 16px;
    box-shadow: 0 12px 32px rgba(12, 13, 14, 0.1);
    z-index: 300;
    min-height: auto;
    overflow-y: auto;
    max-height: calc(100vh - var(--nav-h));
  }
  .mtab-nav.is-open .mtab-nav-list {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    width: 100%;
    gap: 0;
  }
  .mtab-nav.is-open .mtab-nav-item {
    height: auto;
    width: 100%;
    border-bottom: 1px solid var(--border-2);
  }
  .mtab-nav.is-open .mtab-nav-item:last-child {
    border-bottom: none;
  }
  .mtab-nav.is-open .mtab-nav-link {
    height: auto;
    min-height: 44px;
    padding: 12px 14px;
    border-radius: 0;
    background: transparent;
    color: var(--text-1);
    display: flex;
    align-items: center;
    width: 100%;
    font-size: 14px;
    font-weight: 500;
    gap: 8px;
    transition: color 0.15s ease, background 0.15s ease;
  }
  .mtab-nav.is-open .mtab-nav-link:hover {
    background: var(--primary-1);
    color: var(--primary);
  }
  .mtab-nav.is-open .mtab-nav-link.is-active::after { display: none; }
  .mtab-nav.is-open .mtab-nav-link.is-active {
    background: transparent;
    color: var(--primary);
    font-weight: 600;
  }
  .mtab-nav.is-open .mtab-nav-link.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: var(--primary);
  }
  .mtab-nav.is-open .mtab-nav-item {
    position: relative;
  }

  /* 子菜单 */
  .mtab-nav.is-open .mtab-dropdown {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: #f7f9fb;
    padding: 4px 12px 8px 28px;
    margin: 0 0 6px;
    animation: none;
  }
  .mtab-nav.is-open .mtab-dropdown a {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 10px;
    margin: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 400;
  }
  .mtab-nav.is-open .mtab-dropdown a:hover {
    background: var(--primary-1);
    color: var(--primary);
  }
  .mtab-nav.is-open .mtab-dropdown li {
    list-style: none;
  }

  .mtab-user-name { display: none; }

  .mtab-neighbors { grid-template-columns: 1fr; }
  .mtab-neighbor-next { text-align: left; }
  .mtab-footer-inner { flex-direction: column; align-items: flex-start; }

  /* 手机端文章列表：一行两列，卡片加高 */
  .mtab-skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .mtab-skill-card {
    min-height: 240px;
  }
  .mtab-skill-cover {
    height: 150px;
  }
  .mtab-skill-body {
    padding: 12px;
    gap: 6px;
    flex: 1;
  }
  .mtab-skill-title {
    font-size: 13px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
  }
  .mtab-skill-desc {
    font-size: 11px;
    line-height: 1.55;
    min-height: 34px;
    -webkit-line-clamp: 2;
  }
  .mtab-skill-footer {
    margin-top: auto;
    padding-top: 8px;
    border-top: none;
  }
  .mtab-skill-author-name {
    max-width: 64px;
    font-size: 11px;
  }
  .mtab-skill-author .mtab-avatar {
    width: 18px;
    height: 18px;
    font-size: 9px;
  }
  .mtab-badge-top {
    font-size: 9px;
    padding: 0 4px;
  }
}

@media (max-width: 480px) {
  .mtab-form-row { grid-template-columns: 1fr; }
  .mtab-container { padding: 0 16px; }
  .mtab-header-inner { padding: 0 16px; }
  .mtab-skill-grid { gap: 8px; }
  .mtab-skill-card { min-height: 220px; }
  .mtab-skill-cover { height: 130px; }
  .mtab-skill-body { padding: 10px; }
  .mtab-skill-title { font-size: 12px; }
  .mtab-skill-desc {
    font-size: 10px;
    min-height: 30px;
    -webkit-line-clamp: 2;
  }
}

/* ============================================
   Auth 登录 / 注册
   ============================================ */
.mtab-auth-page {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background: var(--bg-soft);
}

.mtab-auth-page .auth-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, var(--primary-1) 0%, transparent 40%),
    radial-gradient(circle at 100% 100%, #F3FBF6 0%, transparent 40%),
    #F1F4F8;
  z-index: 0;
}

.mtab-auth-page .bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
}
.mtab-auth-page .orb-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  background: linear-gradient(135deg, #B3CCFF, #387BFF);
}
.mtab-auth-page .orb-2 {
  width: 320px;
  height: 320px;
  bottom: -80px;
  left: -80px;
  background: linear-gradient(135deg, #BAE9CB, #17B267);
}
.mtab-auth-page .bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-2) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.4;
  mask-image: radial-gradient(circle at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at center, black 20%, transparent 70%);
}

.mtab-auth-page .auth-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 520px;
}

.mtab-auth-page .auth-card {
  width: 100%;
  background: var(--bg-white);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  box-shadow: var(--shadow-3);
  padding: 36px 40px;
}
.mtab-auth-page .auth-header {
  margin-bottom: 24px;
}
.mtab-auth-page .auth-alert {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.mtab-auth-page .auth-alert-error {
  color: #B42318;
  background: #FEF3F2;
  border: 1px solid #FECDCA;
}
.mtab-auth-page .auth-alert-ok {
  color: #027A48;
  background: #ECFDF3;
  border: 1px solid #ABEFC6;
}
.mtab-auth-page .auth-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 4px;
}
.mtab-auth-page .auth-subtitle {
  font-size: 14px;
  color: var(--text-3);
  margin: 0;
  line-height: 1.6;
}

.mtab-auth-page .auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}
.mtab-auth-page .form-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mtab-auth-page .form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}
.mtab-auth-page .form-input-wrap {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  background: var(--bg-white);
  border: 1px solid var(--border-3);
  border-radius: 8px;
  transition: all 150ms ease;
}
.mtab-auth-page .form-input-wrap:focus-within {
  border-color: #387BFF;
  box-shadow: 0 0 0 3px var(--primary-2);
}
.mtab-auth-page .input-icon {
  color: var(--text-3);
  flex-shrink: 0;
}
.mtab-auth-page .form-input {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 8px;
  font-size: 14px;
  color: var(--text-1);
  min-width: 0;
  font-family: inherit;
}
.mtab-auth-page .form-input::placeholder { color: var(--text-3); }
.mtab-auth-page .input-suffix-btn {
  background: transparent;
  border: none;
  color: var(--text-3);
  padding: 4px;
  display: flex;
  cursor: pointer;
  border-radius: 8px;
}
.mtab-auth-page .input-suffix-btn:hover { color: var(--primary); background: var(--bg-4); }

.form-captcha-row { margin-top: 6px; }
.form-captcha-row img {
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  cursor: pointer;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.mtab-auth-page .submit-btn {
  height: 44px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 150ms ease;
  box-shadow: 0 2px 8px rgba(22, 100, 255, 0.2);
  width: 100%;
}
.mtab-auth-page .submit-btn:hover,
.mtab-auth-page .submit-btn:focus,
.mtab-auth-page .submit-btn:focus-visible,
.mtab-auth-page .submit-btn:active {
  box-shadow: 0 4px 16px rgba(22, 100, 255, 0.3);
  transform: translateY(-1px);
  color: #fff !important;
  outline: none;
}

.mtab-auth-page .auth-divider {
  text-align: center;
  margin: 20px 0 12px;
  position: relative;
}
.mtab-auth-page .auth-divider::before,
.mtab-auth-page .auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 70px);
  height: 1px;
  background: var(--border-2);
}
.mtab-auth-page .auth-divider::before { left: 0; }
.mtab-auth-page .auth-divider::after { right: 0; }
.mtab-auth-page .auth-divider span {
  display: inline-block;
  padding: 0 12px;
  font-size: 12px;
  color: var(--text-3);
  background: var(--bg-white);
}

.mtab-auth-page .switch-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 44px;
  background: var(--bg-4);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  transition: all 150ms ease;
}
.mtab-auth-page .switch-btn:hover {
  background: var(--primary-1);
  border-color: #B3CCFF;
  color: var(--primary);
}

.auth-back-home {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-3);
}
.auth-back-home:hover { color: var(--primary); }

@media (max-width: 640px) {
  .mtab-auth-page {
    padding: 16px;
    align-items: flex-start;
    padding-top: max(24px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  .mtab-auth-page .orb-1 {
    width: 260px;
    height: 260px;
    top: -80px;
    right: -80px;
  }
  .mtab-auth-page .orb-2 {
    width: 220px;
    height: 220px;
    bottom: -60px;
    left: -60px;
  }
  .mtab-auth-page .auth-wrap {
    max-width: 100%;
  }
  .mtab-auth-page .auth-card {
    padding: 28px 20px;
    border-radius: 12px;
  }
  .mtab-auth-page .auth-title {
    font-size: 22px;
  }
  .mtab-auth-page .auth-header {
    margin-bottom: 20px;
  }
  .mtab-auth-page .submit-btn,
  .mtab-auth-page .switch-btn {
    height: 42px;
  }
}

/* ============================================
   Profile 个人中心
   ============================================ */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}
.profile-layout > * {
  min-width: 0;
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  min-width: 0;
  max-width: 100%;
}

.profile-user-card {
  background: var(--bg-white);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 24px 20px 20px;
  box-shadow: var(--shadow-1);
  text-align: center;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--bg-4);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
  overflow: hidden;
  border: 3px solid var(--border-2);
}
.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 点击更换头像 */
.profile-avatar-btn {
  position: relative;
  padding: 0;
  border: 3px solid var(--border-2);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.profile-avatar-btn:hover,
.profile-avatar-btn:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-2);
  outline: none;
}
.avatar-edit-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 13, 14, 0.45);
  color: #fff;
  opacity: 0;
  transition: opacity 150ms ease;
  border-radius: 50%;
}
.profile-avatar-btn:hover .avatar-edit-overlay,
.profile-avatar-btn:focus-visible .avatar-edit-overlay {
  opacity: 1;
}

/* 裁剪弹窗 */
.avatar-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(12, 13, 14, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: mtabFade 150ms ease;
}
.avatar-modal-mask[hidden] { display: none !important; }
.avatar-modal {
  width: 100%;
  max-width: 520px;
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow-3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
}
.avatar-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-2);
}
.avatar-modal-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}
.avatar-modal-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.avatar-modal-close:hover { background: var(--bg-4); color: var(--text-1); }
.avatar-modal-body { padding: 16px 18px 8px; }
.avatar-crop-stage {
  max-width: 100%;
  height: 280px;
  background: var(--bg-4);
  border-radius: 8px;
  overflow: hidden;
}
.avatar-crop-stage img { max-width: 100%; display: block; }
.avatar-modal-tip {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}
.avatar-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--border-2);
  margin-top: 8px;
}
.avatar-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 1100;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--text-1);
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-3);
}
.avatar-toast.is-ok { background: #1ebf6f; }
.avatar-toast[hidden] { display: none !important; }

/* 写文章封面上传 */
.mtab-cover-upload {
  width: 100%;
}
.mtab-cover-pick {
  width: 100%;
  min-height: 100px;
  border: 1px dashed var(--border-3);
  border-radius: var(--radius-md);
  background: var(--bg-4);
  color: var(--text-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.mtab-cover-pick:hover {
  border-color: var(--primary-hover);
  background: var(--primary-1);
  color: var(--primary);
}
.mtab-cover-preview {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-2);
}
.mtab-cover-preview[hidden] { display: none !important; }
.mtab-cover-preview img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
}
.mtab-cover-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(12, 13, 14, 0.55);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mtab-cover-remove:hover { background: rgba(12, 13, 14, 0.75); }
.mtab-cover-crop-stage {
  height: 240px;
  background: #0d1117;
}
@media (max-width: 600px) {
  .mtab-cover-crop-stage { height: 180px; }
  .avatar-crop-stage { height: 200px; }
}

.profile-username {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
}
.profile-email {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text-3);
  word-break: break-all;
}

.profile-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: 16px;
  background: var(--bg-4);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 150ms ease;
}
.profile-edit-btn:hover {
  background: var(--primary-1);
  border-color: #B3CCFF;
  color: var(--primary);
}

.profile-nav {
  background: var(--bg-white);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow-1);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.nav-group { margin-bottom: 8px; min-width: 0; }
.nav-group:last-child { margin-bottom: 0; }
.nav-group-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  padding: 6px 10px 8px;
  letter-spacing: 0.04em;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  transition: background 120ms ease, color 120ms ease;
}
.nav-item:hover {
  background: var(--bg-4);
  color: var(--text-1);
}
.nav-item.active {
  background: var(--primary-1);
  color: var(--primary);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--primary);
}
.nav-item-icon {
  display: flex;
  color: var(--text-3);
  flex-shrink: 0;
}
.nav-item.active .nav-item-icon { color: var(--primary); }
.nav-item-label { white-space: nowrap; }

.profile-content {
  min-width: 0;
}
.content-header {
  margin-bottom: 16px;
}
.content-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.content-header-text {
  min-width: 0;
  flex: 1;
}
.content-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
}
.content-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
}

.profile-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}
.profile-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-detail-label {
  font-size: 12px;
  color: var(--text-3);
}
.profile-detail-value {
  font-size: 14px;
  color: var(--text-1);
  font-weight: 500;
}
.profile-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-2);
}

.profile-post-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-post-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: var(--bg-white);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  text-decoration: none;
  color: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.profile-post-item:hover {
  border-color: var(--primary-4);
  box-shadow: var(--shadow-2);
  color: inherit;
}
.profile-post-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}
.profile-post-item:hover .profile-post-title { color: var(--primary); }
.profile-post-meta {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.profile-post-arrow {
  color: var(--text-3);
  font-size: 16px;
  flex-shrink: 0;
}
.profile-post-item:hover .profile-post-arrow { color: var(--primary); }

/* 自建个人中心表单 */
.profile-flash {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid var(--border-2);
  background: var(--bg-4);
  color: var(--text-2);
}
.profile-flash.is-ok {
  background: #e2f5eb;
  border-color: #8dd8b3;
  color: #189959;
}
.profile-flash.is-err {
  background: #feeced;
  border-color: #fa9ea3;
  color: #c43138;
}

.uc-form { display: flex; flex-direction: column; gap: 14px; }
.uc-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.uc-form-row { display: flex; flex-direction: column; gap: 6px; }
.uc-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}
.uc-help { font-size: 12px; color: var(--text-3); }
.uc-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

/* Markdown 编辑器 */
.mtab-md-editor {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  background: var(--bg-white);
  overflow: hidden;
}
.mtab-md-editor:focus-within {
  border-color: var(--primary-hover);
  box-shadow: 0 0 0 3px var(--primary-2);
}
.mtab-md-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-2);
  background: var(--bg-4);
  padding: 4px 6px 0;
}
.mtab-md-tab {
  height: 32px;
  padding: 0 14px;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.mtab-md-tab:hover { color: var(--primary); }
.mtab-md-tab.is-active {
  background: var(--bg-white);
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.mtab-md-source {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  height: 320px;
  min-height: 280px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
  padding: 14px 16px;
  background: transparent;
}
.mtab-md-editor:focus-within .mtab-md-source {
  border: none !important;
  box-shadow: none !important;
}
.mtab-md-preview {
  display: block;
  min-height: 320px;
  max-height: 520px;
  overflow: auto;
  padding: 16px 18px;
  background: var(--bg-white);
}
.mtab-md-preview[hidden] { display: none !important; }
.mtab-md-preview > :first-child { margin-top: 0 !important; }

@media (max-width: 600px) {
  .mtab-md-source { height: 260px; }
  .mtab-md-preview { min-height: 240px; }
}
.uc-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.profile-post-row {
  cursor: default;
}
.profile-post-row:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow-1);
}
.profile-post-main { text-decoration: none; color: inherit; min-width: 0; flex: 1; }
.profile-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.uc-inline-form { display: inline-flex; margin: 0; }
.uc-danger { color: #c43138 !important; border-color: #fa9ea3 !important; }
.uc-danger:hover { background: #feeced !important; color: #c43138 !important; }

@media (max-width: 600px) {
  .uc-form-grid { grid-template-columns: 1fr; }
  .profile-post-row { flex-direction: column; align-items: stretch; }
  .profile-post-actions { width: 100%; }
}

/* ============================================
   个人中心 · 手机端布局优化
   ============================================ */
@media (max-width: 900px) {
  .profile-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .profile-sidebar {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .profile-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* 用户卡片：横向紧凑 */
  .profile-user-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    text-align: left;
  }
  .profile-avatar,
  .profile-avatar-btn {
    width: 52px;
    height: 52px;
    margin: 0;
    font-size: 20px;
    border-width: 2px;
    flex-shrink: 0;
  }
  .profile-user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
  }
  .profile-username {
    font-size: 15px;
    margin: 0;
    line-height: 1.3;
  }
  .profile-email {
    margin: 0;
    font-size: 11px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .profile-edit-btn {
    height: 28px;
    padding: 0 12px;
    font-size: 11px;
    margin-top: 2px;
  }

  /* 导航：手机端整块隐藏，改由顶栏下拉进入 */
  .profile-nav {
    display: none !important;
  }

  /* 内容区卡片 */
  .profile-content .mtab-card {
    padding: 16px;
    overflow: hidden;
  }
  .content-title {
    font-size: 18px;
  }
  .content-header {
    margin-bottom: 12px;
  }
  /* 标题行：按钮不撑破 */
  .content-header-actions {
    align-items: center;
    width: 100%;
  }
  .content-header-actions .content-header-text {
    flex: 1 1 auto;
    min-width: 0;
  }
  .content-header-actions .mtab-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* 表单 */
  .uc-form {
    gap: 12px;
  }
  .uc-form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .uc-form-actions .mtab-btn {
    width: 100%;
    justify-content: center;
  }

  /* 头像裁剪弹窗 */
  .avatar-modal {
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    max-height: 90vh;
  }
  .avatar-crop-stage {
    height: 220px;
  }
  .avatar-modal-footer {
    flex-wrap: wrap;
  }
  .avatar-modal-footer .mtab-btn {
    flex: 1;
    min-width: 80px;
  }

  /* 文章网格与卡片：防止溢出 */
  .profile-content .mtab-skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .profile-content .mtab-skill-card {
    min-width: 0;
    overflow: hidden;
  }
  .profile-content .mtab-skill-body {
    padding: 10px;
    min-width: 0;
  }
  .profile-content .mtab-skill-header {
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
  }
  .profile-content .mtab-skill-title {
    font-size: 13px;
    line-height: 1.35;
    max-width: 100%;
    min-width: 0;
  }
  .profile-content .mtab-badge-top {
    flex-shrink: 0;
    font-size: 10px;
    padding: 0 4px;
    height: auto;
    line-height: 1.5;
  }
  .profile-content .mtab-skill-desc {
    font-size: 11px;
    -webkit-line-clamp: 2;
    word-break: break-word;
  }
  .profile-content .uc-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 8px;
    width: 100%;
  }
  .profile-content .uc-card-actions .mtab-btn,
  .profile-content .uc-card-actions .uc-inline-form {
    width: 100%;
    min-width: 0;
  }
  .profile-content .uc-card-actions .uc-inline-form {
    display: block;
  }
  .profile-content .uc-card-actions .mtab-btn {
    height: 30px;
    padding: 0 4px;
    font-size: 11px;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .profile-content .mtab-skill-author-name,
  .profile-content .mtab-skill-stats time {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .profile-user-card {
    gap: 12px;
    padding: 12px 14px;
  }
  .profile-avatar,
  .profile-avatar-btn {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }
  .mtab-main {
    padding-top: 20px;
    padding-bottom: 32px;
  }
  /* 手机投稿管理：一列，避免挤爆 */
  .profile-content .mtab-skill-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .profile-content .mtab-skill-cover {
    height: 140px;
  }
  .profile-content .mtab-skill-title {
    font-size: 14px;
  }
  .content-header-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .content-header-actions .mtab-btn {
    width: 100%;
  }
  .uc-filter-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .uc-filter-tabs::-webkit-scrollbar { display: none; }
  .uc-filter-tabs .mtab-chip {
    flex-shrink: 0;
  }
}
