/* 小溪的博客 — 商业化设计系统 2026
   最后加载；通过 body.ui-pro 提升优先级，兼容各模板局部样式。
   仅负责视觉与响应式，不改变任何状态类、JS 钩子或业务行为。 */

:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --card-bg: #ffffff;
  --surface-subtle: #f8fafc;
  --surface-raised: #ffffff;
  --text: #172033;
  --text-light: #475569;
  --text-muted: #7b8799;
  --muted: #7b8799;
  --accent: #155eef;
  --accent-h: #0b4fc2;
  --accent-soft: #edf4ff;
  --accent2: #0e7490;
  --accent2-h: #155e75;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --hover-bg: #f1f5f9;
  --input-bg: #ffffff;
  --success: #15803d;
  --danger: #dc2626;
  --warning: #b45309;
  --radius: 14px;
  --radius-sm: 9px;
  --header-h: 72px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 5px 18px rgba(15, 23, 42, .035);
  --shadow-h: 0 12px 32px rgba(15, 23, 42, .09), 0 3px 10px rgba(15, 23, 42, .04);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, .03), 0 5px 18px rgba(15, 23, 42, .035);
  --font: Inter, "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

body.dark {
  --bg: #0d1420;
  --card: #151e2d;
  --card-bg: #151e2d;
  --surface-subtle: #111a28;
  --surface-raised: #1a2536;
  --text: #e7edf6;
  --text-light: #b6c2d2;
  --text-muted: #8291a7;
  --muted: #8291a7;
  --accent: #72a5ff;
  --accent-h: #a3c2ff;
  --accent-soft: #172a49;
  --accent2: #67c6dc;
  --accent2-h: #9bd9e7;
  --border: #29374a;
  --border-strong: #3a4b63;
  --hover-bg: #1c293b;
  --input-bg: #111a28;
  --shadow: 0 1px 2px rgba(0, 0, 0, .16), 0 8px 24px rgba(0, 0, 0, .1);
  --shadow-h: 0 16px 40px rgba(0, 0, 0, .28);
  --shadow-card: var(--shadow);
}

/* 基础排版与可访问性 */
body.ui-pro {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.ui-pro .container { max-width: 1200px; padding-inline: 28px; }
body.ui-pro a { color: var(--accent); text-decoration: none; }
body.ui-pro a:hover { color: var(--accent-h); text-decoration: none; }
body.ui-pro ::selection { background: #cfe0ff; color: #102a56; }
body.ui-pro.dark ::selection { background: #294c82; color: #f4f8ff; }
body.ui-pro :focus-visible { outline: 3px solid rgba(21, 94, 239, .26); outline-offset: 3px; }
body.ui-pro img { max-width: 100%; }
body.ui-pro button,
body.ui-pro input,
body.ui-pro select,
body.ui-pro textarea { font-family: inherit; }
body.ui-pro button,
body.ui-pro .btn,
body.ui-pro a { touch-action: manipulation; }
body.ui-pro .text-muted { color: var(--text-muted) !important; }

/* 页面切换：短促、克制，支持减少动态效果；无脚本时内容照常显示 */
body.ui-pro .main { opacity: 1; transform: none; animation: ui-page-in .3s var(--ease) both; }
body.ui-pro.is-ready .main { opacity: 1; transform: none; animation: none; }
body.ui-pro.page-leaving .main { opacity: .45; transform: translateY(2px); transition: opacity .12s, transform .12s; }
@keyframes ui-page-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
body.ui-pro .main { padding: 36px 0 20px; }
body.ui-pro .main-layout { gap: 32px; }
body.ui-pro .content { min-width: 0; }

/* 顶部导航 */
body.ui-pro .header {
  height: var(--header-h);
  background: rgba(255, 255, 255, .96) !important;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .015) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}
body.ui-pro.dark .header { background: rgba(13, 20, 32, .96) !important; }
body.ui-pro .header-inner { height: var(--header-h); gap: 24px; }
body.ui-pro .logo { display: inline-flex; align-items: center; gap: 11px; color: var(--text); transition: none; }
body.ui-pro .logo:hover { transform: none; color: var(--text); }
body.ui-pro .logo .brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 11px; background: var(--accent); color: #fff;
  font-size: 18px; font-weight: 650; letter-spacing: 0;
  box-shadow: 0 5px 14px rgba(21, 94, 239, .2);
}
body.ui-pro .logo .brand-copy { display: flex; flex-direction: column; line-height: 1.15; color: var(--text); }
body.ui-pro .logo .brand-copy strong { font-size: 17px; font-weight: 650; letter-spacing: .02em; }
body.ui-pro .logo .brand-copy small { margin-top: 5px; color: var(--text-muted); font-size: 9px; font-weight: 500; letter-spacing: .13em; }
body.ui-pro .nav,
body.ui-pro .nav-panel { display: flex; align-items: center; }
body.ui-pro .nav { flex: 1; justify-content: flex-end; min-width: 0; }
body.ui-pro .nav-panel { gap: 16px; }
body.ui-pro .nav-links { gap: 2px; }
body.ui-pro .nav-links a {
  position: relative; padding: 8px 12px !important; border: 0 !important;
  border-radius: 8px !important; color: var(--text-light); font-size: 14px; font-weight: 500;
  transition: color .18s, background-color .18s;
}
body.ui-pro .nav-links a::after { display: none !important; }
body.ui-pro .nav-links a:hover { color: var(--text); background: var(--hover-bg) !important; }
body.ui-pro .nav-links a.active { color: var(--accent) !important; background: var(--accent-soft) !important; font-weight: 600; }
body.ui-pro .nav-actions { gap: 8px; }
body.ui-pro .nav-btn,
body.ui-pro .nav-avatar-btn {
  width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); color: var(--text-light); transition: border-color .18s, background-color .18s, color .18s, transform .12s;
}
body.ui-pro .nav-btn:hover,
body.ui-pro .nav-avatar-btn:hover { border-color: var(--border-strong); background: var(--hover-bg); color: var(--accent); }
body.ui-pro .nav-btn:active,
body.ui-pro .nav-avatar-btn:active { transform: scale(.95); }
body.ui-pro .nav-search { position: relative; gap: 0; }
body.ui-pro .nav-search input {
  width: 152px; height: 38px; padding: 0 38px 0 13px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface-subtle); color: var(--text); font-size: 13px;
  transition: width .22s var(--ease), border-color .18s, box-shadow .18s, background-color .18s;
}
body.ui-pro .nav-search input:focus { width: 196px; border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 3px rgba(21, 94, 239, .09); }
body.ui-pro .nav-search button {
  position: absolute; right: 1px; top: 1px; width: 36px; height: 36px; padding: 0;
  justify-content: center; border: 0; border-radius: 9px; background: transparent; color: var(--text-muted);
}
body.ui-pro .nav-search button:hover { color: var(--accent); background: transparent; }
body.ui-pro .mobile-search { display: none; }

/* 首页品牌区 */
body.ui-pro .home-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px;
  align-items: center; margin-bottom: 24px; padding: 34px 36px; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
}
body.ui-pro .home-hero::after {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: var(--accent);
}
body.ui-pro .hero-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--accent); font-size: 11px; font-weight: 650; letter-spacing: .15em; }
body.ui-pro .hero-kicker::before { content: ""; width: 18px; height: 2px; background: var(--accent); }
body.ui-pro .home-hero h1 { margin: 0 0 10px; color: var(--text); font-size: clamp(25px, 3vw, 34px); font-weight: 650; line-height: 1.35; letter-spacing: -.035em; }
body.ui-pro .home-hero p { max-width: 570px; margin: 0; color: var(--text-light); font-size: 14px; line-height: 1.85; }
body.ui-pro .hero-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
body.ui-pro .hero-stats { display: grid; grid-template-columns: repeat(2, minmax(84px, 1fr)); gap: 12px; min-width: 194px; }
body.ui-pro .hero-stat { padding: 18px 14px; text-align: center; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 12px; }
body.ui-pro .hero-stat strong { display: block; color: var(--text); font-size: 23px; font-weight: 650; line-height: 1.25; font-variant-numeric: tabular-nums; }
body.ui-pro .hero-stat span { display: block; margin-top: 4px; color: var(--text-muted); font-size: 11px; }
body.ui-pro .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 30px 2px 14px; }
body.ui-pro .section-heading h2 { margin: 0; color: var(--text); font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
body.ui-pro .section-heading span { color: var(--text-muted); font-size: 12px; }

/* 卡片与文章列表 */
body.ui-pro .post-item {
  position: relative; margin-bottom: 14px; padding: 25px 28px 23px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important; animation: none !important;
  transition: transform .22s var(--ease), border-color .22s, box-shadow .22s !important;
}
body.ui-pro .post-item::before { display: none !important; }
body.ui-pro .post-item:hover { transform: translateY(-2px) !important; border-color: var(--border-strong) !important; box-shadow: var(--shadow-h) !important; }
body.ui-pro .post-title { margin-bottom: 9px; font-size: 20px; font-weight: 630; line-height: 1.5; letter-spacing: -.02em; }
body.ui-pro .post-title a { color: var(--text); }
body.ui-pro .post-title a:hover { color: var(--accent); }
body.ui-pro .post-meta { gap: 8px 16px; margin-bottom: 10px; color: var(--text-muted); font-size: 12px; }
body.ui-pro .post-meta i { color: #93a1b5; font-size: 11px; }
body.ui-pro .post-desc { margin-bottom: 15px; color: var(--text-light); font-size: 14px; line-height: 1.85; }
body.ui-pro .read-more { gap: 7px; color: var(--accent); font-size: 13px; font-weight: 600; }
body.ui-pro .read-more i { transition: transform .18s var(--ease); }
body.ui-pro .read-more:hover i { transform: translateX(3px); }
body.ui-pro .tag { border-radius: 6px; background: var(--surface-subtle); }

/* 侧边栏 */
body.ui-pro .sidebar { width: 292px; }
body.ui-pro .sidebar .s-card { margin-bottom: 16px; }
body.ui-pro .s-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important; animation: none !important; transition: border-color .2s, box-shadow .2s !important;
}
body.ui-pro .s-card:hover { transform: none !important; border-color: var(--border-strong) !important; box-shadow: var(--shadow) !important; }
body.ui-pro .s-card-head { padding: 15px 18px 12px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 13px; font-weight: 650; letter-spacing: .02em; }
body.ui-pro .author-bg { height: 52px !important; background: #172b4d !important; border-radius: 13px 13px 0 0 !important; }
body.ui-pro.dark .author-bg { background: #203757 !important; }
body.ui-pro .author-body { margin-top: -29px !important; padding: 0 20px 17px; text-align: left; }
body.ui-pro .author-body .avatar { width: 62px; height: 62px; margin: 0 0 12px; border: 3px solid var(--card); box-shadow: 0 3px 10px rgba(15, 23, 42, .12); }
body.ui-pro .author-body h3 { font-size: 17px; font-weight: 650; }
body.ui-pro .author-bio { margin-top: 3px; color: var(--text-muted); font-size: 12px; }
body.ui-pro .author-counters { background: var(--surface-subtle); }
body.ui-pro .counter { padding: 12px 8px; }
body.ui-pro .counter b { color: var(--text); font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
body.ui-pro .counter span { font-size: 11px; }
body.ui-pro .s-list { padding: 7px 0; counter-reset: side-item; }
body.ui-pro .s-list li { position: relative; padding: 8px 18px; transition: none; }
body.ui-pro .s-list li:hover { padding-left: 18px; background: var(--surface-subtle); }
body.ui-pro .s-list a { color: var(--text-light); font-size: 13px; line-height: 1.55; }
body.ui-pro .s-list a:hover { color: var(--accent); }
body.ui-pro .story-card .story-text p { padding: 16px 18px; color: var(--text-light); font-size: 13px; font-style: normal; line-height: 1.85; text-indent: 0; }
body.ui-pro .story-refresh { min-height: 39px; color: var(--text-muted); font-size: 12px; }
body.ui-pro .story-refresh:hover { color: var(--accent); background: var(--surface-subtle); }

/* 小故事卡片：取消旧的吸底浮层，始终留在侧边栏内 */
body.ui-pro .story-card,
body.ui-pro .story-card.stuck {
  position: static !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  z-index: auto !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  animation: none !important;
}
body.ui-pro .story-card .story-text { min-height: 74px; }
body.ui-pro .story-card .story-text p {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

/* 桌面端侧边栏吸顶跟随；内容超过视口时在栏内滚动，但滚动条不可见 */
@media (min-width: 901px) {
  body.ui-pro .sidebar.is-sticky {
    position: sticky;
    top: calc(var(--header-h) + 18px);
    align-self: flex-start;
    max-height: calc(100vh - var(--header-h) - 36px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* 旧版 Edge/IE */
  }
  body.ui-pro .sidebar.is-sticky::-webkit-scrollbar { width: 0; height: 0; display: none; }
  body.ui-pro .sidebar.is-sticky::-webkit-scrollbar-thumb,
  body.ui-pro .sidebar.is-sticky::-webkit-scrollbar-track { background: transparent; }
  body.ui-pro .sidebar.is-sticky > *:last-child { margin-bottom: 0; }
}

/* 通用按钮、表单与状态反馈 */
body.ui-pro .btn,
body.ui-pro .btn-primary,
body.ui-pro .btn-submit,
body.ui-pro .cf-submit,
body.ui-pro .profile-save-btn,
body.ui-pro .profile-avatar-change,
body.ui-pro .slot-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 39px; padding: 8px 17px; border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-sm) !important; background: var(--card) !important; color: var(--text) !important;
  font-size: 13px; font-weight: 550; line-height: 1.45; cursor: pointer;
  transition: background-color .18s, border-color .18s, color .18s, box-shadow .18s, transform .12s;
}
body.ui-pro .btn:hover { border-color: var(--accent) !important; background: var(--accent-soft) !important; color: var(--accent) !important; }
body.ui-pro .btn-primary,
body.ui-pro .btn-submit,
body.ui-pro .cf-submit,
body.ui-pro .profile-save-btn,
body.ui-pro .profile-avatar-change {
  border-color: var(--accent) !important; background: var(--accent) !important; color: #fff !important;
  box-shadow: 0 3px 8px rgba(21, 94, 239, .14);
}
body.ui-pro .btn-primary:hover,
body.ui-pro .btn-submit:hover,
body.ui-pro .cf-submit:hover,
body.ui-pro .profile-save-btn:hover,
body.ui-pro .profile-avatar-change:hover { border-color: var(--accent-h) !important; background: var(--accent-h) !important; color: #fff !important; }
body.ui-pro .btn:active,
body.ui-pro .btn-submit:active,
body.ui-pro .cf-submit:active,
body.ui-pro .slot-btn:active { transform: translateY(1px) scale(.985); }
body.ui-pro .btn-danger { color: var(--danger) !important; }
body.ui-pro .btn-sm { min-height: 31px; padding: 4px 10px; font-size: 12px; }
body.ui-pro button:disabled,
body.ui-pro .btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
body.ui-pro .is-loading { position: relative; pointer-events: none; opacity: .78; }
body.ui-pro .is-loading::after {
  content: ""; width: 13px; height: 13px; margin-left: 7px; border: 2px solid currentColor;
  border-right-color: transparent; border-radius: 50%; animation: ui-spin .65s linear infinite;
}
@keyframes ui-spin { to { transform: rotate(360deg); } }

body.ui-pro input[type="text"],
body.ui-pro input[type="password"],
body.ui-pro input[type="number"],
body.ui-pro input[type="date"],
body.ui-pro input[type="email"],
body.ui-pro input[type="url"],
body.ui-pro textarea,
body.ui-pro select,
body.ui-pro .form-input,
body.ui-pro .form-select,
body.ui-pro .cf-input,
body.ui-pro .cf-textarea,
body.ui-pro .answer-input {
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--input-bg); color: var(--text);
  font-size: 14px; transition: border-color .18s, box-shadow .18s, background-color .18s;
}
body.ui-pro input::placeholder,
body.ui-pro textarea::placeholder { color: #9aa7b8; }
body.ui-pro input:focus,
body.ui-pro textarea:focus,
body.ui-pro select:focus,
body.ui-pro .form-input:focus,
body.ui-pro .form-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(21, 94, 239, .1); }
body.ui-pro .fg { margin-bottom: 18px; }
body.ui-pro .fg label { margin-bottom: 7px; color: var(--text-light); font-size: 13px; font-weight: 550; }
body.ui-pro .fg input[type="text"],
body.ui-pro .fg input[type="password"],
body.ui-pro .fg textarea,
body.ui-pro .fg select { min-height: 42px; padding: 9px 12px; background: var(--input-bg); }
body.ui-pro .flash { padding: 12px 16px; border: 1px solid #bfd5fb; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
body.ui-pro .empty,
body.ui-pro .empty-state,
body.ui-pro .comments-empty { color: var(--text-muted); }

/* 文章详情与评论 */
body.ui-pro .post-full,
body.ui-pro .comments-section {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius) !important; box-shadow: var(--shadow) !important;
}
body.ui-pro .post-full { padding: 42px 46px; }
body.ui-pro .post-full h1 { margin-bottom: 14px; font-size: clamp(25px, 3vw, 32px); font-weight: 650; line-height: 1.45; letter-spacing: -.035em; }
body.ui-pro .post-full > .post-meta { padding-bottom: 20px; border-bottom: 1px solid var(--border); }
body.ui-pro .post-body { margin-top: 26px; color: var(--text-light); font-size: 16px; line-height: 1.95; overflow-wrap: anywhere; }
body.ui-pro .post-body p { text-align: left; }
body.ui-pro .post-body table { display: block; width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
body.ui-pro .post-body pre { max-width: 100%; overflow-x: auto; }
body.ui-pro .post-body h2 { margin: 38px 0 15px; padding-bottom: 10px; font-size: 22px; font-weight: 630; letter-spacing: -.02em; }
body.ui-pro .post-body h3 { margin: 30px 0 12px; font-size: 18px; font-weight: 630; }
body.ui-pro .post-body a { color: var(--accent); border-bottom: 1px solid rgba(21, 94, 239, .28) !important; }
body.ui-pro .post-body a:hover { border-bottom-color: var(--accent) !important; }
body.ui-pro .post-body blockquote { border-left: 3px solid var(--accent); background: var(--accent-soft); }
body.ui-pro .post-body pre { position: relative; border: 1px solid var(--border); border-radius: 10px; background: #f6f8fb; }
body.ui-pro.dark .post-body pre { background: #0b1220; border-color: var(--border); }
body.ui-pro .post-body code { border-radius: 5px; background: #edf1f6; }
body.ui-pro.dark .post-body code { background: #223047; }
body.ui-pro .post-body pre code { background: transparent; }
body.ui-pro .post-body img { border: 1px solid var(--border); box-shadow: none; cursor: zoom-in; }
body.ui-pro .code-copy {
  position: absolute; top: 9px; right: 9px; padding: 4px 8px; border: 1px solid var(--border-strong);
  border-radius: 6px; background: var(--card); color: var(--text-muted); font-size: 11px; cursor: pointer;
}
body.ui-pro .code-copy:hover { color: var(--accent); border-color: var(--accent); }
body.ui-pro .comments-section { margin-top: 20px; padding: 28px 32px; }
body.ui-pro .comments-title { padding-bottom: 14px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 18px; font-weight: 630; }
body.ui-pro .comment-avatar { background: var(--accent-soft) !important; color: var(--accent) !important; font-weight: 600; }
body.ui-pro .comment-item { padding: 18px 0; }
body.ui-pro .comment-author { font-weight: 600; }
body.ui-pro .comment-form { gap: 12px; }
body.ui-pro .cf-input,
body.ui-pro .cf-textarea { padding: 11px 13px; background: var(--input-bg); }

/* 页头、分页、页脚 */
body.ui-pro .page-head,
body.ui-pro .admin-head,
body.ui-pro .history-header,
body.ui-pro .ana-header,
body.ui-pro .review-header,
body.ui-pro .meal-header { margin-bottom: 24px; }
body.ui-pro .page-head h1,
body.ui-pro .admin-head h1,
body.ui-pro .history-header h1,
body.ui-pro .ana-header h1,
body.ui-pro .review-header h1,
body.ui-pro .meal-header h1 { color: var(--text); font-weight: 650; letter-spacing: -.025em; }
body.ui-pro .page-head h1 i,
body.ui-pro .admin-head h1 i,
body.ui-pro .meal-header h1 i { color: var(--accent); }
body.ui-pro .pagination { gap: 7px; margin-top: 26px; }
body.ui-pro .pagination a,
body.ui-pro .pagination span { min-width: 38px; height: 38px; border: 1px solid var(--border) !important; border-radius: 9px !important; background: var(--card) !important; color: var(--text-light) !important; }
body.ui-pro .pagination a:hover { border-color: var(--accent) !important; background: var(--accent-soft) !important; color: var(--accent) !important; }
body.ui-pro .pagination .curr { border-color: var(--accent) !important; background: var(--accent) !important; color: #fff !important; }
body.ui-pro .footer { margin-top: 54px; padding: 28px 0; border-top: 1px solid var(--border); background: var(--card); text-align: left; }
body.ui-pro .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
body.ui-pro .footer p { color: var(--text-muted); font-size: 12px; }
body.ui-pro .footer-brand { color: var(--text-light); font-weight: 550; }
body.ui-pro .footer-note { letter-spacing: .02em; }

/* 登录与后台 */
body.ui-pro .login-box { max-width: 410px; margin: 52px auto; padding: 38px; border: 1px solid var(--border); border-radius: 16px !important; background: var(--card); box-shadow: var(--shadow-h) !important; }
body.ui-pro .login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
body.ui-pro .login-brand .brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 19px; }
body.ui-pro .login-box h1 { margin: 0; text-align: left; font-size: 22px; font-weight: 650; }
body.ui-pro .login-subtitle { margin: 3px 0 0; color: var(--text-muted); font-size: 12px; }
body.ui-pro .login-box .btn { min-height: 43px; margin-top: 4px; }
body.ui-pro .admin-head { padding-bottom: 18px; border-bottom: 1px solid var(--border); }
body.ui-pro .admin-head h1 { font-size: 23px; }
body.ui-pro .admin-table,
body.ui-pro .stats-section,
body.ui-pro .stats-grid .stat-card {
  background: var(--card) !important; border: 1px solid var(--border) !important; border-radius: var(--radius) !important; box-shadow: var(--shadow) !important;
}
body.ui-pro .admin-table { padding: 8px 18px; }
body.ui-pro .admin-table table,
body.ui-pro .content > table,
body.ui-pro .stats-table { width: 100%; border-collapse: collapse; color: var(--text); }
body.ui-pro .admin-table th,
body.ui-pro .content > table th,
body.ui-pro .stats-table th { padding: 13px 12px; border-bottom: 1px solid var(--border-strong); background: var(--surface-subtle); color: var(--text-muted) !important; font-size: 11px; font-weight: 650; letter-spacing: .04em; }
body.ui-pro .admin-table td,
body.ui-pro .content > table td,
body.ui-pro .stats-table td { padding: 13px 12px; border-bottom: 1px solid var(--border) !important; color: var(--text-light); }
body.ui-pro .admin-table tr:last-child td,
body.ui-pro .content > table tr:last-child td,
body.ui-pro .stats-table tr:last-child td { border-bottom: 0 !important; }
body.ui-pro .admin-table tr:hover td,
body.ui-pro .content > table tr:hover td,
body.ui-pro .stats-table tr:hover td { background: var(--surface-subtle) !important; }
body.ui-pro .stats-grid { gap: 16px; }
body.ui-pro .stats-grid .stat-card { padding: 22px; text-align: left; }
body.ui-pro .stat-card .num { color: var(--accent) !important; font-size: 30px; font-weight: 650; font-variant-numeric: tabular-nums; }
body.ui-pro .stat-card .label { color: var(--text-light) !important; font-weight: 550; }
body.ui-pro .stat-card .sub { color: var(--text-muted) !important; }
body.ui-pro .stats-section { padding: 24px; }
body.ui-pro .stats-section h2 { color: var(--text) !important; font-weight: 630; }
body.ui-pro .stats-section h2 i { color: var(--accent) !important; }
body.ui-pro .chart-bar-item .bar { background: var(--accent) !important; border-radius: 5px 5px 2px 2px; }
body.ui-pro .chart-bar-item .bar-label { color: var(--text-muted) !important; }

/* 考试与学习组件 */
body.ui-pro .exam-categories,
body.ui-pro .subject-list,
body.ui-pro .exam-modules { max-width: 780px; }
body.ui-pro .category-card,
body.ui-pro .subject-card,
body.ui-pro .module-card,
body.ui-pro .exam-card,
body.ui-pro .record-card,
body.ui-pro .question-card,
body.ui-pro .result-q-card,
body.ui-pro .group-card,
body.ui-pro .list-card,
body.ui-pro .detail-card,
body.ui-pro .q-card,
body.ui-pro .section {
  background: var(--card); border: 1px solid var(--border) !important; border-radius: var(--radius) !important; box-shadow: var(--shadow) !important;
}
body.ui-pro .category-card,
body.ui-pro .subject-card,
body.ui-pro .module-card,
body.ui-pro .exam-card { transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
body.ui-pro .category-card:hover,
body.ui-pro .subject-card:hover,
body.ui-pro .module-card:hover,
body.ui-pro .exam-card:hover { transform: translateY(-2px); border-color: var(--accent) !important; box-shadow: var(--shadow-h) !important; }
body.ui-pro .category-card { padding: 24px; }
body.ui-pro .category-icon,
body.ui-pro .subject-icon,
body.ui-pro .module-icon { color: var(--accent); }
body.ui-pro .category-info h2,
body.ui-pro .subject-info h2,
body.ui-pro .module-info h2 { font-weight: 630; }
body.ui-pro .category-badge,
body.ui-pro .subject-badge { font-weight: 600; }
body.ui-pro .exam-header,
body.ui-pro .result-header { background: var(--card); border-color: var(--border); box-shadow: var(--shadow); }
body.ui-pro.exam-page .exam-header { top: var(--header-h); }
body.ui-pro .question-card { padding: 24px; }
body.ui-pro .q-stem,
body.ui-pro .rq-stem { color: var(--text); line-height: 1.8; }
body.ui-pro .opt-label,
body.ui-pro .rq-option,
body.ui-pro .d-option,
body.ui-pro .quiz-option { border-color: var(--border); transition: border-color .16s, background-color .16s, transform .12s; }
body.ui-pro .opt-label:hover,
body.ui-pro .d-option:hover,
body.ui-pro .quiz-option:hover { border-color: var(--accent); background: var(--accent-soft); }
body.ui-pro .opt-label:active,
body.ui-pro .quiz-option:active { transform: scale(.995); }
body.ui-pro .exam-sheet-num,
body.ui-pro .drawer-num { border-radius: 8px; }
body.ui-pro .tabs .tab,
body.ui-pro .tab-btn { transition: color .18s, background-color .18s, border-color .18s; }
body.ui-pro .trend-chart,
body.ui-pro .chart-bar { overflow-x: auto; overscroll-behavior-inline: contain; }
body.ui-pro.exam-page .vtop-btn,
body.ui-pro.result-page .vtop-btn { bottom: 148px; }

/* 餐饮、统计与编辑器 */
body.ui-pro .meal-section {
  margin-bottom: 18px; padding: 24px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
body.ui-pro .meal-section > h2 { color: var(--text); font-size: 17px; font-weight: 630; }
body.ui-pro .meal-slot,
body.ui-pro .stat-item,
body.ui-pro .price-stats .stat-item { border-color: var(--border); background: var(--surface-subtle); }
body.ui-pro .meal-slot { border-radius: 12px; transition: border-color .18s, box-shadow .18s; }
body.ui-pro .meal-slot:hover { border-color: var(--accent); box-shadow: var(--shadow); }
body.ui-pro .stat-item { border-radius: 11px; }
body.ui-pro .stat-num { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
body.ui-pro .stats-grid .stat-item { padding: 16px; text-align: center; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 11px; }
body.ui-pro .price-stats .stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
body.ui-pro .food-date-header { background: var(--surface-subtle); }
body.ui-pro .food-item { transition: background-color .16s; }
body.ui-pro .food-item:hover { background: var(--surface-subtle); }
body.ui-pro .food-del { min-width: 32px; min-height: 32px; border-radius: 7px; }
body.ui-pro .food-del:hover { background: #fef2f2; color: var(--danger); }
body.ui-pro .md-toolbar { padding: 8px; border-color: var(--border-strong); border-radius: 10px 10px 0 0; background: var(--surface-subtle); }
body.ui-pro .md-tb-btn { min-width: 32px; height: 30px; border-radius: 6px; }
body.ui-pro .md-editor-wrap { border-color: var(--border-strong); border-radius: 0 0 10px 10px; }
body.ui-pro .md-textarea,
body.ui-pro .md-preview { background: var(--card); }
body.ui-pro .md-hint { display: block; margin: 12px 0 0; line-height: 1.7; }

/* 弹窗、搜索建议与浮动操作 */
body.ui-pro .modal-overlay { background: rgba(15, 23, 42, .58); backdrop-filter: blur(3px); }
body.ui-pro .profile-modal,
body.ui-pro .modal-content,
body.ui-pro .pay-modal { border: 1px solid var(--border); border-radius: 16px !important; background: var(--card); box-shadow: 0 24px 70px rgba(15, 23, 42, .24) !important; }
body.ui-pro .profile-modal-head { padding: 18px 22px; }
body.ui-pro .profile-modal-body { padding: 22px; }
body.ui-pro .profile-field input { min-height: 40px; border-radius: 8px; background: var(--input-bg); }
body.ui-pro .modal-close { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; }
body.ui-pro .modal-close:hover { background: var(--hover-bg); color: var(--text); }
body.ui-pro .ss-dropdown { padding: 6px; border: 1px solid var(--border); border-radius: 12px !important; background: var(--card); box-shadow: var(--shadow-h) !important; }
body.ui-pro .ss-item { padding: 10px 12px; border-radius: 8px; }
body.ui-pro .ss-item:hover,
body.ui-pro .ss-item.active { background: var(--accent-soft); color: var(--accent); }
body.ui-pro .vtop-btn,
body.ui-pro .float-nav-btn { border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px !important; background: var(--accent); box-shadow: 0 7px 20px rgba(21, 94, 239, .25) !important; }
body.ui-pro .vtop-btn:hover { transform: translateY(-2px); }
body.ui-pro .lightbox { backdrop-filter: blur(8px); }

/* 桌面与平板 */
@media (max-width: 1080px) {
  body.ui-pro .container { padding-inline: 22px; }
  body.ui-pro .header-inner { gap: 14px; }
  body.ui-pro .nav-panel { gap: 9px; }
  body.ui-pro .nav-links a { padding-inline: 9px !important; }
  body.ui-pro .nav-search input { width: 120px; }
  body.ui-pro .nav-search input:focus { width: 150px; }
  body.ui-pro .main-layout { gap: 24px; }
  body.ui-pro .sidebar { width: 270px; }
}

@media (max-width: 900px) {
  body.ui-pro .main-layout { gap: 26px; align-items: stretch; }
  body.ui-pro .content { width: 100%; }
  body.ui-pro .sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: 100%; }
  body.ui-pro .sidebar .s-card { margin-bottom: 0; }
  body.ui-pro .sidebar .author-card,
  body.ui-pro .sidebar .story-card { grid-column: 1 / -1; }
  body.ui-pro .home-hero { padding: 30px; }
}

/* 移动导航与通用移动布局 */
@media (max-width: 820px) {
  :root { --header-h: 64px; }
  body.ui-pro .container { padding-inline: 18px; }
  body.ui-pro .main { padding-top: 22px; }
  body.ui-pro .header-inner { gap: 12px; }
  body.ui-pro .logo .brand-mark { width: 35px; height: 35px; border-radius: 10px; }
  body.ui-pro .logo .brand-copy strong { font-size: 16px; }
  body.ui-pro .logo .brand-copy small { display: none; }
  body.ui-pro .mobile-search { display: flex; flex: 1; max-width: 250px; margin: 0 0 0 auto; }
  body.ui-pro .mobile-search input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px 0 0 9px; background: var(--surface-subtle); color: var(--text); font-size: 16px; }
  body.ui-pro .mobile-search button { width: 40px; height: 38px; border: 1px solid var(--border); border-left: 0; border-radius: 0 9px 9px 0; background: var(--surface-subtle); color: var(--text-muted); }
  body.ui-pro .nav { flex: 0 0 auto; }
  body.ui-pro .nav-toggle { display: flex; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
  body.ui-pro .nav-panel {
    position: absolute; top: var(--header-h); left: 0; right: 0; display: none; padding: 12px 18px 18px;
    background: var(--card); border-bottom: 1px solid var(--border); box-shadow: 0 16px 30px rgba(15, 23, 42, .1);
  }
  body.ui-pro .nav-panel.open { display: block; animation: ui-menu-in .18s var(--ease); }
  @keyframes ui-menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
  body.ui-pro .nav-links { position: static; display: flex; flex-direction: column; align-items: stretch; width: 100%; padding: 0; border: 0; background: transparent; }
  body.ui-pro .nav-links a { min-height: 44px; padding: 11px 12px !important; border-bottom: 1px solid var(--border) !important; border-radius: 7px !important; }
  body.ui-pro .nav-links a.active { border-bottom-color: var(--border) !important; }
  body.ui-pro .nav-actions { display: flex; align-items: center; gap: 9px; padding-top: 14px; }
  body.ui-pro .nav-actions .nav-search { display: flex; flex: 1; }
  body.ui-pro .nav-actions .nav-search input { width: 100%; height: 40px; font-size: 16px; }
  body.ui-pro .nav-actions .nav-search input:focus { width: 100%; }
  body.ui-pro .nav-actions .nav-search button { height: 38px; }
  body.ui-pro .home-hero { grid-template-columns: 1fr; gap: 22px; }
  body.ui-pro .hero-stats { grid-template-columns: repeat(2, 1fr); min-width: 0; }
  body.ui-pro .post-full { padding: 30px 28px; }
  body.ui-pro .comments-section { padding: 24px; }
  body.ui-pro .footer-inner { align-items: flex-start; flex-direction: column; gap: 5px; }
  body.ui-pro .admin-head { align-items: flex-start; flex-direction: row; }
  body.ui-pro .admin-table { padding: 6px 12px; }
  body.ui-pro .content > table { display: block; max-width: 100%; overflow-x: auto; white-space: nowrap; }
  body.ui-pro .stats-section { overflow-x: auto; }
  body.ui-pro .meal-page .meal-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.ui-pro .meal-section { padding: 20px; }
  body.ui-pro .price-stats .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.ui-pro .add-form { align-items: stretch; }
  body.ui-pro .add-form .form-input,
  body.ui-pro .add-form .form-select { flex: 1 1 160px; min-height: 42px; }
  body.ui-pro .add-form .btn { flex: 1 1 100%; }
  body.ui-pro .question-card { padding: 20px; }
  body.ui-pro.exam-page .exam-header { top: var(--header-h); }
}

@media (max-width: 640px) {
  body.ui-pro { font-size: 14px; }
  body.ui-pro .container { padding-inline: 14px; }
  body.ui-pro .main { padding-top: 16px; }
  body.ui-pro .mobile-search { display: none; }
  body.ui-pro .header-inner { justify-content: space-between; }
  body.ui-pro .sidebar { display: flex; flex-direction: column; gap: 14px; }
  body.ui-pro .home-hero { margin-bottom: 18px; padding: 26px 22px; border-radius: 14px; }
  body.ui-pro .home-hero h1 { font-size: 25px; }
  body.ui-pro .home-hero p { font-size: 13px; }
  body.ui-pro .hero-actions { gap: 9px; margin-top: 17px; }
  body.ui-pro .hero-actions .btn { flex: 1; padding-inline: 12px; }
  body.ui-pro .section-heading { margin-top: 24px; }
  body.ui-pro .post-item { padding: 20px; }
  body.ui-pro .post-item:hover { transform: none !important; box-shadow: var(--shadow) !important; }
  body.ui-pro .post-title { font-size: 18px; }
  body.ui-pro .post-meta { gap: 5px 12px; }
  body.ui-pro .post-full { padding: 25px 20px; }
  body.ui-pro .post-full h1 { font-size: 24px; }
  body.ui-pro .post-body { font-size: 15px; line-height: 1.9; }
  body.ui-pro .post-body h2 { font-size: 20px; }
  body.ui-pro .post-body pre { margin-inline: -4px; }
  body.ui-pro .comments-section { padding: 22px 18px; }
  body.ui-pro .comment-meta { flex-wrap: wrap; gap: 2px 10px; }
  body.ui-pro .login-box { margin: 24px auto; padding: 28px 22px; }
  body.ui-pro .admin-head { flex-direction: column; align-items: stretch; }
  body.ui-pro .admin-head .btn { align-self: flex-start; }
  body.ui-pro .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  body.ui-pro .stats-grid .stat-card { padding: 16px; }
  body.ui-pro .stat-card .num { font-size: 24px; }
  body.ui-pro .stats-section { padding: 16px; }
  body.ui-pro .category-card { padding: 19px; gap: 14px; }
  body.ui-pro .category-icon { min-width: 46px; font-size: 2rem; }
  body.ui-pro .category-card .icon-fallback { font-size: 2rem; }
  body.ui-pro .exam-card-header { flex-wrap: wrap; }
  body.ui-pro .exam-card-actions { flex-wrap: wrap; }
  body.ui-pro .question-card { padding: 17px; }
  body.ui-pro .meal-page .meal-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  body.ui-pro .meal-section { padding: 17px; }
  body.ui-pro .food-item { align-items: flex-start; gap: 8px; }
  body.ui-pro .food-item-left { gap: 6px; }
  body.ui-pro .food-note { flex-basis: 100%; }
  body.ui-pro .md-hint { display: none; }
  body.ui-pro .vtop-btn { right: 14px; bottom: 22px; }
  body.ui-pro.exam-page .vtop-btn,
  body.ui-pro.result-page .vtop-btn { bottom: 144px; }
  body.ui-pro .profile-modal { max-height: 92vh; }
  body.ui-pro .profile-modal-body { padding: 18px; }
}

@media (max-width: 380px) {
  body.ui-pro .home-hero { padding: 23px 18px; }
  body.ui-pro .hero-stats { gap: 8px; }
  body.ui-pro .post-item { padding: 18px 16px; }
  body.ui-pro .post-full { padding: 22px 16px; }
  body.ui-pro .stats-grid { grid-template-columns: 1fr !important; }
  body.ui-pro .meal-page .meal-timeline { grid-template-columns: 1fr; }
}

/* 减少动态效果与打印 */
@media (prefers-reduced-motion: reduce) {
  body.ui-pro .main,
  body.ui-pro.is-ready .main { opacity: 1; transform: none; transition: none; }
  body.ui-pro *, body.ui-pro *::before, body.ui-pro *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  body.ui-pro { background: #fff; }
  body.ui-pro .header,
  body.ui-pro .sidebar,
  body.ui-pro .footer,
  body.ui-pro .vtop-btn,
  body.ui-pro .comments-section,
  body.ui-pro .post-back { display: none !important; }
  body.ui-pro .main { padding: 0; opacity: 1; transform: none; }
  body.ui-pro .post-full { padding: 0; border: 0; box-shadow: none; }
}
