/* ==========================================================================
   易记脑图 · 统一设计层（在各页面自带样式之后加载，用于统一观感）
   只做"打磨"，不改各页布局结构；命名统一以 .ynav 前缀避免冲突。
   ========================================================================== */

:root {
  --u-brand: #4f6ef7;
  --u-brand-deep: #3b55d9;
  --u-brand-2: #8b5cf6;
  --u-ink: #12162a;
  --u-ink-2: #4a5268;
  --u-muted: #7b8398;
  --u-line: rgba(18, 22, 42, 0.08);
  --u-card: #fff;
  --u-soft: #eef2ff;
  --u-max: 1200px;
  --u-nav-h: 60px;
  --u-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------------- 基础观感 ---------------- */
html {
  scroll-behavior: smooth;
}
body.has-app-nav {
  background-image: radial-gradient(1200px 600px at 50% -240px, #f2f5ff 0%, rgba(242, 245, 255, 0) 70%);
  background-repeat: no-repeat;
}
::selection {
  background: rgba(79, 110, 247, 0.18);
  color: #12162a;
}
*:focus-visible {
  outline: 2px solid rgba(79, 110, 247, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(18, 22, 42, 0.18) transparent;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(18, 22, 42, 0.16);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(18, 22, 42, 0.3);
  background-clip: content-box;
}

/* ---------------- 统一导航 ---------------- */
.ynav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--u-line);
  transition: box-shadow 0.25s var(--u-ease), background 0.25s var(--u-ease);
}
.ynav.scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px -22px rgba(18, 22, 42, 0.6);
}

/* 三段式：品牌 | 主菜单（居中） | 右侧操作区 */
.ynav-in {
  max-width: var(--u-max);
  margin: 0 auto;
  height: var(--u-nav-h);
  padding: 0 24px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

/* 主菜单清空时（只留品牌 + 右侧账号区）：两栏并排，右侧贴边 */
.ynav-in.ynav-in-solo {
  grid-template-columns: auto auto;
  justify-content: space-between;
}

.ynav-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-self: start;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--u-ink);
  white-space: nowrap;
}
.ynav-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #5b7cfa, #8b5cf6);
  box-shadow: 0 8px 16px -10px rgba(79, 110, 247, 0.95);
  transition: transform 0.25s var(--u-ease);
}
.ynav-brand:hover .ynav-mark {
  transform: rotate(-6deg) scale(1.04);
}
.ynav-brand-txt b {
  font-weight: 800;
}

/* 主菜单：真正居中，项间距舒展 */
.ynav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 4px;
  min-width: 0;
}
.ynav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--u-ink-2);
  white-space: nowrap;
  transition: background 0.16s var(--u-ease), color 0.16s var(--u-ease);
}
.ynav-link svg {
  flex: none;
  opacity: 0.55;
  transition: opacity 0.16s var(--u-ease), transform 0.16s var(--u-ease);
}
.ynav-link:hover {
  background: #f3f6ff;
  color: var(--u-brand-deep);
}
.ynav-link:hover svg {
  opacity: 1;
}
.ynav-link.is-on {
  background: var(--u-soft);
  color: var(--u-brand-deep);
}
.ynav-link.is-on svg {
  opacity: 1;
  color: var(--u-brand);
}
/* 当前页：底部小指示条，位置感更明确 */
.ynav-link.is-on::after {
  content: '';
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--u-brand);
}

/* 右侧操作区 */
.ynav-right {
  justify-self: end;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}
.ynav-sep {
  width: 1px;
  height: 20px;
  background: var(--u-line);
  flex: none;
  margin: 0 2px;
}
.ynav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(18, 22, 42, 0.12);
  background: #fff;
  color: var(--u-ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.16s var(--u-ease);
}
.ynav-btn:hover {
  border-color: rgba(79, 110, 247, 0.5);
  color: var(--u-brand-deep);
  transform: translateY(-1px);
}
.ynav-btn.is-primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--u-brand), var(--u-brand-2));
  box-shadow: 0 10px 22px -12px rgba(79, 110, 247, 0.9);
}
.ynav-btn.is-primary:hover {
  color: #fff;
  filter: brightness(1.04);
  box-shadow: 0 12px 26px -12px rgba(79, 110, 247, 1);
}
.ynav-btn:active {
  transform: translateY(0) scale(0.99);
}

.ynav-admin,
.ynav-login {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--u-ink-2);
  white-space: nowrap;
  transition: 0.16s var(--u-ease);
}
.ynav-admin:hover,
.ynav-login:hover {
  background: #f3f6ff;
  color: var(--u-brand-deep);
}
.ynav-admin svg {
  opacity: 0.7;
}
.ynav-admin:hover svg {
  opacity: 1;
}
.ynav-login {
  color: var(--u-brand-deep);
  background: rgba(79, 110, 247, 0.07);
}
.ynav-login:hover {
  background: rgba(79, 110, 247, 0.13);
}

.ynav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px 0 4px;
  border-radius: 99px;
  border: 1px solid transparent;
  transition: 0.16s var(--u-ease);
}
.ynav-user:hover {
  background: #f5f7ff;
  border-color: rgba(79, 110, 247, 0.18);
}
.ynav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ffb199, #ff7a59);
}
.ynav-uname {
  font-size: 13px;
  font-weight: 600;
  color: var(--u-ink-2);
  max-width: 8em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ynav-out {
  height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--u-muted);
  white-space: nowrap;
  flex: none;
  cursor: pointer;
  transition: 0.16s var(--u-ease);
}
.ynav-out:hover {
  background: #fff1f1;
  color: #d94a4a;
}

/* 中屏收敛：先收间距，再藏图标，菜单仍居中 */
@media (max-width: 1180px) {
  .ynav-in {
    padding: 0 18px;
    gap: 10px;
  }
  .ynav-link {
    padding: 0 10px;
    font-size: 13px;
    gap: 6px;
  }
  .ynav-link.is-on::after {
    left: 10px;
    right: 10px;
  }
  .ynav-btn {
    padding: 0 11px;
    font-size: 12.5px;
  }
}
@media (max-width: 1000px) {
  .ynav-link svg {
    display: none;
  }
  .ynav-link {
    padding: 0 11px;
  }
  .ynav-link.is-on::after {
    left: 11px;
    right: 11px;
  }
  .ynav-brand-txt {
    display: none;
  }
}

/* 移动端底部标签栏 */
.ynav-bnav {
  display: none;
}
@media (max-width: 900px) {
  .ynav-menu {
    display: none;
  }
  .ynav-in {
    display: flex;
    justify-content: space-between;
    padding: 0 14px;
    gap: 8px;
  }
  .ynav-right {
    margin-left: auto;
  }
  .ynav-brand-txt b {
    font-size: 14.5px;
  }
  .ynav-uname {
    display: none;
  }
  .ynav-user {
    padding: 0 4px;
  }
  .ynav-btn {
    padding: 0 11px;
  }
  .ynav-sep {
    display: none;
  }
  .ynav-bnav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid var(--u-line);
  }
  .ynav-tab {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 2px 4px;
    border-radius: 11px;
    color: var(--u-muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: -0.2px;
    transition: 0.16s var(--u-ease);
  }
  .ynav-tab svg {
    width: 20px;
    height: 20px;
    transition: transform 0.16s var(--u-ease);
  }
  .ynav-tab.is-on {
    color: var(--u-brand-deep);
    background: rgba(79, 110, 247, 0.09);
  }
  .ynav-tab.is-on svg {
    transform: translateY(-1px);
  }
  /* 当前标签顶部小圆点，位置感更明确 */
  .ynav-tab.is-on::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2.5px;
    border-radius: 0 0 3px 3px;
    background: var(--u-brand);
  }
  .ynav-tab:active {
    transform: scale(0.95);
  }
  body.has-app-nav.has-bnav {
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
  }
}

/* ---------------- 页面节奏 ---------------- */
.wrap {
  max-width: var(--u-max);
}
.hero {
  border-radius: 22px !important;
  background: linear-gradient(118deg, #eef2ff 0%, #f6f3ff 52%, #fff4ef 100%) !important;
  border: 1px solid rgba(79, 110, 247, 0.13) !important;
  box-shadow: 0 22px 50px -46px rgba(18, 22, 42, 0.65);
}
.hero h1 {
  letter-spacing: -0.8px;
  line-height: 1.18;
}
.hero .chip {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* ---------------- 按钮 / 表单 打磨 ---------------- */
.btn-primary,
.btn-brand,
.btn.btn-primary {
  transition: transform 0.16s var(--u-ease), box-shadow 0.16s var(--u-ease), filter 0.16s var(--u-ease) !important;
}
.btn-primary:hover,
.btn-brand:hover,
.btn.btn-primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 12px 26px -14px rgba(79, 110, 247, 0.95);
}
.btn-primary:active,
.btn-brand:active,
.btn.btn-primary:active,
.btn-ghost:active,
.btn.btn-ghost:active,
.mini-btn:active {
  transform: translateY(0) scale(0.985);
}
.btn-ghost,
.btn.btn-ghost,
.mini-btn {
  transition: 0.16s var(--u-ease) !important;
}
.btn-ghost:hover,
.btn.btn-ghost:hover,
.mini-btn:hover {
  box-shadow: 0 8px 18px -16px rgba(18, 22, 42, 0.8);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]),
textarea,
select {
  transition: border-color 0.16s var(--u-ease), box-shadow 0.16s var(--u-ease), background 0.16s var(--u-ease);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]):focus,
textarea:focus,
select:focus {
  border-color: rgba(79, 110, 247, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(79, 110, 247, 0.1) !important;
  outline: none !important;
}

/* ---------------- 浮层 ---------------- */
.mask {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  background: rgba(18, 22, 42, 0.42) !important;
}
.mask .modal {
  box-shadow: 0 40px 90px -40px rgba(18, 22, 42, 0.6) !important;
  border-radius: 20px !important;
}
.toast {
  border-radius: 12px !important;
  box-shadow: 0 20px 40px -22px rgba(18, 22, 42, 0.8) !important;
  font-weight: 600;
}

/* ---------------- 细节 ---------------- */
.kbd-hint {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid rgba(18, 22, 42, 0.14);
  background: #fff;
  color: var(--u-muted);
  font-size: 11px;
  font-family: inherit;
  line-height: 1;
  pointer-events: none;
}
@media (max-width: 760px) {
  .kbd-hint {
    display: none;
  }
}
.search:has(> .kbd-hint) input {
  padding-right: 36px;
}

@media (max-width: 760px) {
  .wrap {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .hero {
    padding: 22px 20px !important;
    margin-top: 16px !important;
  }
  .hero-art {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------------- 小屏（≤560px）：顶部导航瘦身 ---------------- */
@media (max-width: 560px) {
  .ynav-in {
    padding: 0 10px;
    gap: 6px;
    min-height: 52px;
  }
  .ynav-brand {
    gap: 7px;
    padding: 0;
  }
  .ynav-dense .ynav-brand-txt {
    display: none;
  }
  .ynav-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }
  .ynav-out {
    display: none !important;
  }
  .ynav-btn {
    height: 32px;
    padding: 0 10px;
    font-size: 12.5px;
    border-radius: 9px;
  }
  .ynav-btn svg {
    width: 14px;
    height: 14px;
  }
  .ynav-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .ynav-user {
    margin-left: 0;
  }
  .ynav-admin {
    font-size: 12px;
    padding: 0 8px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    background: rgba(79, 110, 247, 0.08);
  }
  /* 内容区左右留白统一，底部给标签栏留足空间 */
  .wrap {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  body.has-app-nav.has-bnav {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
}

/* ==========================================================================
   页面级设计打磨（统一各页的头部 / 筛选栏 / 卡片网格）
   ========================================================================== */

/* ---------------- 页面头部：标题 + 说明 + 操作 ---------------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.page-head h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: -0.6px;
  color: var(--u-ink);
}
.page-head .sub {
  margin: 7px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--u-muted);
}
.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

/* ---------------- 筛选栏：统一的"白底圆角条" ---------------- */
.bar,
.toolbar {
  border-radius: 14px;
}
/* 只有 .toolbar 套白底条；广场/小店的 .bar 是通栏粘性条，保持原样 */
.toolbar {
  background: #fff;
  border: 1px solid var(--u-line);
  border-radius: 14px;
  box-shadow: 0 12px 28px -26px rgba(18, 22, 42, 0.5);
  padding: 12px 14px;
}
/* 后台工具栏带多个操作按钮，保持通透，不套白底条 */
#admin .toolbar,
body.admin-page .toolbar {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

/* 分类/标签胶囊：统一高度与 hover 反馈 */
.cats button,
.tabs button,
.seg button {
  transition: color 0.16s var(--u-ease), background 0.16s var(--u-ease),
    border-color 0.16s var(--u-ease), box-shadow 0.16s var(--u-ease);
}

/* 计数文字：右对齐时更稳 */
.count {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 4.5em;
}

/* 后台 tab 行：与题库页一致的分段控件 */
.admin-page .tabs,
.admin-page .tabbar {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: #eef1fe;
  border-radius: 11px;
}
.admin-page .tabs button,
.admin-page .tabbar button {
  padding: 7px 15px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--u-ink-2);
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.16s var(--u-ease), color 0.16s var(--u-ease),
    box-shadow 0.16s var(--u-ease);
}
.admin-page .tabs button:hover,
.admin-page .tabbar button:hover {
  color: var(--u-brand-deep);
}
.admin-page .tabs button.on,
.admin-page .tabs button.active,
.admin-page .tabbar button.on,
.admin-page .tabbar button.active {
  color: var(--u-brand-deep);
  background: #fff;
  border-color: rgba(79, 110, 247, 0.14);
  box-shadow: 0 2px 8px -4px rgba(79, 110, 247, 0.5);
}
.count b {
  font-weight: 700;
  color: var(--u-ink);
}

/* ---------------- 卡片网格 ---------------- */
.grid {
  gap: 18px;
}
.grid > * {
  transition: transform 0.2s var(--u-ease), box-shadow 0.2s var(--u-ease),
    border-color 0.2s var(--u-ease);
}

/* ---------------- Hero：统一内边距节奏 ---------------- */
.hero {
  border-radius: 24px !important;
}
.hero h1 {
  font-weight: 750;
}
.hero p {
  line-height: 1.75;
}
.hero .chip {
  font-weight: 600;
  transition: transform 0.16s var(--u-ease), border-color 0.16s var(--u-ease);
}
.hero .chip:hover {
  transform: translateY(-1px);
  border-color: rgba(79, 110, 247, 0.4);
}

@media (max-width: 760px) {
  .page-head h1 {
    font-size: 22px;
  }
  .page-head {
    align-items: flex-start;
    gap: 14px;
  }
  .head-actions {
    width: 100%;
  }
  .head-actions .btn-primary {
    flex: 1;
    justify-content: center;
  }
  .toolbar {
    padding: 10px 12px;
  }
}

/* ==========================================================================
   统一视觉规范 v2
   目标：全站同一套按钮 / 卡片 / 表格 / 空状态 / 提示条，观感一致且有质感。
   ========================================================================== */

:root {
  --u-r-card: 16px;
  --u-r-ctl: 10px;
  --u-card-line: #e8ecf5;
  --u-card-line-hi: rgba(79, 110, 247, 0.3);
  --u-shadow-1: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 26px -22px rgba(16, 24, 40, 0.5);
  --u-shadow-2: 0 2px 4px rgba(16, 24, 40, 0.04), 0 20px 44px -26px rgba(16, 24, 40, 0.48);
  --u-ring: 0 0 0 3px rgba(79, 110, 247, 0.16);
}

/* ---------------- 顶部导航：无菜单时的页面标识 ---------------- */
.ynav-ctx {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(79, 110, 247, 0.07);
  color: #3b55d9;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1px;
  white-space: nowrap;
}
.ynav-ctx::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}
@media (max-width: 900px) {
  .ynav-ctx {
    display: none;
  }
}

/* 退出登录：做成与「管理后台」同级的幽灵按钮，不再是一片裸文字 */
.ynav-out {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px !important;
  border-radius: 9px;
  border: 1px solid rgba(18, 22, 42, 0.1);
  background: #fff;
  color: var(--u-ink-2) !important;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.ynav-out:hover {
  border-color: rgba(220, 47, 91, 0.35) !important;
  background: #fff6f8 !important;
  color: #d92b52 !important;
}

/* ---------------- 按钮：一套尺寸与交互 ---------------- */
.btn,
.btn-primary,
.btn-brand,
.btn-ghost,
.btn-plain,
.btn-danger,
.mini-btn,
.btn.btn-primary,
.btn.btn-ghost {
  border-radius: var(--u-r-ctl) !important;
  font-weight: 600 !important;
  letter-spacing: 0.1px;
  white-space: nowrap;
  transition: transform 0.15s var(--u-ease), box-shadow 0.18s var(--u-ease),
    border-color 0.16s var(--u-ease), background 0.16s var(--u-ease), color 0.16s var(--u-ease) !important;
}
.btn svg,
.btn-primary svg,
.btn-brand svg,
.btn-ghost svg,
.btn-plain svg {
  flex: none;
  opacity: 0.9;
}
.btn:hover,
.btn-ghost:hover,
.btn-plain:hover,
.btn-brand:hover:not(:disabled),
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
}
.btn:active,
.btn-primary:active,
.btn-brand:active,
.btn-ghost:active,
.btn-plain:active {
  transform: translateY(0) scale(0.985) !important;
}
.btn:disabled,
.btn-primary:disabled,
.btn-brand:disabled {
  opacity: 0.5 !important;
  transform: none !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}
.btn.primary {
  background: linear-gradient(135deg, #5b7cfa, #7c5cf5) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 10px 22px -14px rgba(79, 110, 247, 0.95);
}
.btn.primary:hover {
  box-shadow: 0 14px 26px -14px rgba(79, 110, 247, 1);
  filter: brightness(1.03);
}
.btn.danger {
  color: #d92b52 !important;
  border-color: #f6d6de !important;
  background: #fff !important;
}
.btn.danger:hover {
  background: #fff5f7 !important;
  border-color: #f0b3c2 !important;
}

/* 小图标按钮：统一命中区域 */
.icon-btn,
.caret {
  transition: transform 0.14s var(--u-ease), color 0.14s var(--u-ease),
    border-color 0.14s var(--u-ease), background 0.14s var(--u-ease) !important;
}
.icon-btn:active,
.caret:active {
  transform: scale(0.94) !important;
}

/* ---------------- 卡片 ---------------- */
.stat,
.panel,
.mcard,
.vcard,
.q-card,
.card {
  border-color: var(--u-card-line);
}
.stat,
.panel {
  box-shadow: var(--u-shadow-1);
}

/* ---------------- 表格：表头更轻，行反馈更明确 ---------------- */
table th {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.2px;
  color: #8a92a6 !important;
  background: #fafbfd !important;
  border-bottom: 1px solid var(--u-card-line) !important;
}
table td {
  font-size: 13px;
  border-bottom: 1px solid #f2f4f9;
}
table tbody tr {
  transition: background 0.14s var(--u-ease);
}
table tbody tr:hover {
  background: #fbfcff;
}

/* 胶囊标签统一 */
.pill,
.chip,
.card-meta .chip {
  border-radius: 999px !important;
  font-weight: 600 !important;
}

/* ---------------- 空状态：统一版式 ---------------- */
.u-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 24px 64px;
}
.u-empty-icon {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #eef2ff, #f6f1ff 70%, #fff4ef);
  border: 1px solid rgba(79, 110, 247, 0.12);
  box-shadow: 0 16px 32px -24px rgba(79, 110, 247, 0.8);
  color: #6b7bf0;
}
.u-empty h3 {
  margin: 18px 0 7px;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--u-ink);
}
.u-empty p {
  margin: 0;
  max-width: 420px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--u-muted);
}
.u-empty-acts {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------------- 提示条 ---------------- */
.toast {
  max-width: min(86vw, 520px);
  padding: 11px 16px !important;
  border-radius: 12px !important;
  background: rgba(18, 22, 42, 0.95) !important;
  color: #fff;
  font-size: 13px !important;
  font-weight: 600;
  line-height: 1.55;
  text-align: left;
  box-shadow: 0 18px 40px -18px rgba(16, 24, 40, 0.7) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
@media (max-width: 760px) {
  .toast {
    bottom: calc(24px + env(safe-area-inset-bottom)) !important;
    max-width: calc(100vw - 32px);
  }
}

/* ---------------- 表单控件 ---------------- */
input:not([type='checkbox']):not([type='radio']):not([type='color']):not([type='file']),
textarea,
select {
  border-radius: var(--u-r-ctl);
}
input::placeholder,
textarea::placeholder {
  color: #a9b1c4;
}

/* ---------------- 分段控件：白片浮起，选中更明确 ---------------- */
.seg {
  background: #eef1fe;
  border-color: transparent !important;
}
.seg button.active {
  background: #fff !important;
  color: #3b55d9 !important;
  box-shadow: 0 2px 7px -3px rgba(79, 110, 247, 0.55);
}

/* ---------------- 模块未开通 / 筹备中 ---------------- */
.mod-down {
  max-width: 560px;
  margin: 48px auto 64px;
  padding: 46px 34px 38px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--u-card-line);
  border-radius: 24px;
  box-shadow: var(--u-shadow-2);
}
.mod-down-art {
  width: 84px;
  height: 84px;
  margin: 0 auto;
  border-radius: 26px;
  display: grid;
  place-items: center;
  color: #6b7bf0;
  background: linear-gradient(150deg, #eef2ff, #f7f0ff 62%, #fff3ee);
  border: 1px solid rgba(79, 110, 247, 0.13);
  box-shadow: 0 18px 36px -26px rgba(79, 110, 247, 0.85);
}
.mod-down h2 {
  margin: 20px 0 9px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.3px;
  color: var(--u-ink);
}
.mod-down p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--u-muted);
}
.mod-down-acts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.mod-down-acts .btn,
.mod-down-acts .btn-primary,
.mod-down-acts .btn-ghost {
  height: 40px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13.5px;
  text-decoration: none;
}
.mod-down-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f1f3f9;
  font-size: 11.5px;
  color: #9aa3b8;
}
@media (max-width: 560px) {
  .mod-down {
    margin: 22px 0 32px;
    padding: 34px 20px 28px;
    border-radius: 20px;
  }
  .mod-down h2 {
    font-size: 17.5px;
  }
}

/* 筹备中面板的动作按钮（不依赖各页自己的按钮类） */
.mod-down-acts a {
  height: 40px;
  padding: 0 18px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.16s var(--u-ease), box-shadow 0.16s var(--u-ease), background 0.16s var(--u-ease);
}
.mod-down-acts a.primary {
  color: #fff;
  background: linear-gradient(135deg, #5b7cfa, #7c5cf5);
  box-shadow: 0 12px 24px -16px rgba(79, 110, 247, 0.95);
}
.mod-down-acts a.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px -16px rgba(79, 110, 247, 1);
}
.mod-down-acts a.ghost {
  color: #3b55d9;
  background: #fff;
  border: 1px solid rgba(79, 110, 247, 0.26);
}
.mod-down-acts a.ghost:hover {
  background: #f7f9ff;
  border-color: rgba(79, 110, 247, 0.5);
}

/* 模块未开通：顶栏里对应的投稿/发布入口一并收起来 */
body.mod-is-down .ynav-btn {
  display: none !important;
}

/* ==========================================================================
   账号菜单（左上角/右上角昵称点开的三个入口）
   ========================================================================== */
.ynav-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 218px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e8ecf5;
  border-radius: 13px;
  box-shadow: 0 18px 40px -24px rgba(16, 24, 40, 0.55);
  z-index: 60;
}
.ynav-right { position: relative; }
.ynav-pop-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px 10px;
  border-bottom: 1px solid #f0f3fa;
  margin-bottom: 5px;
}
.ynav-pop-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6d86ff, #4f6ef7);
  color: #fff;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
}
.ynav-pop-who { min-width: 0; }
.ynav-pop-who b { display: block; font-size: 12.5px; line-height: 1.3; }
.ynav-pop-who em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: #8d96ad;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ynav-pop-item {
  display: flex;
  align-items: center;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12.5px;
  color: #3a4257;
  cursor: pointer;
  text-align: left;
}
.ynav-pop-item:hover { background: #f4f7ff; }
.ynav-pop-item.is-out { color: #d3455b; }
.ynav-pop-dot {
  margin-left: auto;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ff5a6a;
  color: #fff;
  font-size: 10.5px;
  font-style: normal;
  line-height: 16px;
  text-align: center;
}

/* 弹层 */
.ynav-sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 900;
}
.ynav-sheet {
  width: 100%;
  max-width: 420px;
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px -30px rgba(16, 24, 40, 0.7);
  overflow: hidden;
}
.ynav-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid #f0f3fa;
}
.ynav-sheet-head b { font-size: 14px; }
.ynav-sheet-x {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: #98a1b6;
  cursor: pointer;
  padding: 0 2px;
}
.ynav-sheet-body { padding: 16px 18px 18px; overflow: auto; }
.ynav-field {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
}
.ynav-field span { font-size: 12.5px; color: #7b8398; }
.ynav-field input {
  height: 36px;
  padding: 0 11px;
  border: 1px solid #e2e7f3;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  color: #12162a;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
.ynav-field input:disabled { background: #f7f9fd; color: #8d96ad; }
.ynav-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ynav-btn-mini {
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #dfe5f4;
  background: #fff;
  font-family: inherit;
  font-size: 12.5px;
  color: #3a4257;
  cursor: pointer;
}
.ynav-btn-mini:hover { border-color: #c9d4f7; color: #3b55d9; }
.ynav-btn-mini.is-ghost { color: #d3455b; border-color: #f6d6db; }
.ynav-hint { font-size: 12px; color: #8d96ad; }
.ynav-sep-line { height: 1px; background: #f0f3fa; margin: 14px 0; }
.ynav-empty { font-size: 12.5px; color: #8d96ad; text-align: center; padding: 18px 0; }
.ynav-list { display: flex; flex-direction: column; gap: 10px; }
.ynav-notice {
  border: 1px solid #eef1f8;
  border-radius: 11px;
  padding: 11px 12px;
  background: #fff;
}
.ynav-notice.is-new { border-color: #dbe4ff; background: #f8faff; }
.ynav-notice-head { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.ynav-notice-head b { font-size: 13px; }
.ynav-notice-head em { margin-left: auto; font-style: normal; font-size: 11px; color: #98a1b6; }
.ynav-notice-tag {
  font-style: normal;
  font-size: 10px;
  color: #4f6ef7;
  background: #eef1fe;
  border-radius: 5px;
  padding: 1px 5px;
}
.ynav-notice p { margin: 0; font-size: 12.5px; line-height: 1.7; color: #4a5268; white-space: pre-wrap; }
.ynav-log { border-left: 2px solid #e4eaff; padding: 0 0 2px 12px; }
.ynav-log-head { display: flex; align-items: baseline; gap: 8px; }
.ynav-log-head b { font-size: 13px; }
.ynav-log-head em { font-style: normal; font-size: 11.5px; color: #98a1b6; }
.ynav-log ul { margin: 6px 0 0; padding-left: 16px; }
.ynav-log li { font-size: 12.5px; line-height: 1.75; color: #4a5268; }
@media (max-width: 640px) {
  .ynav-pop { position: fixed; top: auto; bottom: 70px; right: 10px; left: 10px; width: auto; }
}
