
:root{
  --bg: #f5f6f7;
  --card: #ffffff;
  --text: #111827;
  --text-weak: #333333;
  --muted: #6b7280;
  --muted2: #9ca3af;
  --border: #e5e7eb;
  --border-weak: #f3f4f6;
  --primary: #3b82f6;
  --primary-2: #1d4ed8;
  --primary-hover: #2563eb;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
  --shadow: 0 8px 18px rgba(17,24,39,.06);
  --shadow-hover: 0 12px 28px rgba(17,24,39,.10);
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --ease-out: cubic-bezier(.2,.8,.2,1);
  --font: "Microsoft YaHei","Segoe UI",system-ui,-apple-system,Roboto,"Helvetica Neue",Arial,"Noto Sans","Apple Color Emoji","Segoe UI Emoji";
}

html[data-theme="dark"]{
  --bg: #0b1220;
  --card: #111827;
  --text: #e5e7eb;
  --text-weak: #e5e7eb;
  --muted: #9ca3af;
  --muted2: #6b7280;
  --border: #1f2937;
  --border-weak: rgba(255,255,255,.06);
  --primary: #60a5fa;
  --primary-2: #93c5fd;
  --primary-hover: #3b82f6;
  --shadow: 0 14px 30px rgba(0,0,0,.35);
  --shadow-hover: 0 18px 40px rgba(0,0,0,.45);
}

/* --- Smooth theme switch + subtle motion --- */
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}

/* Enable color transitions only after JS marks html.rw-theme-ready */
html.rw-theme-ready body,
html.rw-theme-ready .top-bar,
html.rw-theme-ready .tab-nav,
html.rw-theme-ready .bottom-nav,
html.rw-theme-ready .module,
html.rw-theme-ready .card,
html.rw-theme-ready .notice,
html.rw-theme-ready .post-item,
html.rw-theme-ready .post-card,
html.rw-theme-ready .file,
html.rw-theme-ready .btn,
html.rw-theme-ready .pill,
html.rw-theme-ready .theme-toggle,
html.rw-theme-ready .input,
html.rw-theme-ready .textarea,
html.rw-theme-ready .select{
  transition: background-color .22s ease, color .22s ease, border-color .22s ease, box-shadow .22s ease;
}

@media (prefers-reduced-motion: reduce){
  html.rw-theme-ready *{ transition: none !important; animation: none !important; }
}

/* Accessible focus ring for non-input interactive controls */
:where(a, button, [role="button"], .bottom-nav-item, .iconbtn, .theme-toggle, .user-action-item):focus-visible{
  outline: 2px solid rgba(59,130,246,.55);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Placeholder contrast */
:where(.input,.textarea,.select,.search-input,.search-box input)::placeholder{
  color: var(--muted2);
  opacity: 1;
}

/* Card hover lift (desktop only) */
@media (hover:hover){
  .module, .card{
    transition: transform .18s ease, box-shadow .18s ease, background-color .22s ease, color .22s ease, border-color .22s ease;
  }
  .module:hover, .card:hover{
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
  }
}

/* Theme switch crossfade (View Transitions API) */
@supports (view-transition-name: root){
  html{ view-transition-name: root; }
  ::view-transition-old(root){
    animation: rw-vt-fade-out 220ms ease-out both;
  }
  ::view-transition-new(root){
    animation: rw-vt-fade-in 240ms ease-in both;
  }
  @keyframes rw-vt-fade-out{ from{opacity:1;} to{opacity:0;} }
  @keyframes rw-vt-fade-in{ from{opacity:0;} to{opacity:1;} }
}


*{ margin:0; padding:0; box-sizing:border-box; }
html,body{ height:100%; }
body{
  background: var(--bg);
  color: var(--text-weak);
  line-height: 1.5;
  font-size: 14px;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{ color: inherit; text-decoration: none; }
a:hover{ color: var(--primary); }
img{ max-width:100%; height:auto; }

.container{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 10px 84px; /* 预留底部导航高度 */
}

/* 顶部导航（前台 + 后台复用） */
.top-bar, .topbar{
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Subtle elevation when scrolling (adds depth without heaviness) */
body.rw-scrolled .top-bar, body.rw-scrolled .topbar{
  box-shadow: 0 10px 24px rgba(17,24,39,.08);
}
html[data-theme="dark"] body.rw-scrolled .top-bar, html[data-theme="dark"] body.rw-scrolled .topbar{
  box-shadow: 0 18px 40px rgba(0,0,0,.55);
}

.top-nav, .topbar-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Logo */
.logo, .brand{
  display: flex;
  align-items: center;
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  gap: 8px;
  white-space: nowrap;
}
.logo-badge, .brand-mark{
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59,130,246,.10);
  border: 1px solid var(--border);
  color: var(--primary-2);
}

/* Brand logo image (replaces the old gear icon) */
.logo-badge.is-img{
  border-radius: 6px;
  overflow: hidden;
  padding: 3px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(229,231,235,.95);
  box-shadow: 0 6px 14px rgba(17,24,39,.10);
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), background-color .22s ease, border-color .22s ease;
}
html[data-theme="dark"] .logo-badge.is-img{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}
.logo-badge.is-img .brand-logo{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transform: translateZ(0);
}

/* Brand title: softer CNKD-blue gradient + tiny motion */
.brand-text{
  font-size: 18px;
  letter-spacing: .2px;
  line-height: 1;
  position: relative;
  padding-bottom: 2px;
  /* fallback */
  color: var(--primary-2);
  background-image: linear-gradient(90deg,
    rgba(125, 211, 252, .95),
    rgba(147, 197, 253, .95),
    rgba(96, 165, 250, .95),
    rgba(59, 130, 246, .95),
    rgba(56, 189, 248, .95)
  );
  background-size: 260% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rw-brand-shift 14s ease-in-out infinite;
}
.brand-text::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg,
    rgba(59,130,246,0),
    rgba(59,130,246,.45),
    rgba(56,189,248,.35),
    rgba(59,130,246,.45),
    rgba(59,130,246,0)
  );
  transform: scaleX(.05);
  transform-origin: left;
  opacity: .0;
  transition: transform .28s var(--ease-out), opacity .28s var(--ease-out);
}

.logo:hover .logo-badge.is-img,
.logo:focus-visible .logo-badge.is-img{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(17,24,39,.14);
}
.logo:hover .brand-text::after,
.logo:focus-visible .brand-text::after{
  transform: scaleX(1);
  opacity: .95;
}

@keyframes rw-brand-shift{
  0%{ background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
  100%{ background-position: 0% 50%; }
}

/* 搜索框 */
.search-box{
  flex: 1;
  max-width: 520px;
  margin: 0 12px;
  position: relative;
}
.search-box input,
.search-input{
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid rgba(209,213,219,.95);
  border-radius: 20px;
  background-color: rgba(249,250,251,.9);
  color: var(--text);
  font-size: 14px;
  transition: all .2s;
  outline: none;
}
html[data-theme="dark"] .search-box input,
html[data-theme="dark"] .search-input{
  border-color: rgba(255,255,255,.12);
  background-color: rgba(255,255,255,.04);
}
.search-box input:focus,
.search-input:focus{
  border-color: var(--primary);
  background-color: var(--card);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.search-box .search-ico{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted2);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.search{ margin:0; }

/* 右侧动作 */
.user-actions, .topbar-actions{
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.user-action-item{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  position: relative;
}
.user-action-item i{ font-size: 16px; }
.user-action-item:hover{ color: var(--primary); }

.user-action-item .user-nick{
  margin-left: 2px;
  color: var(--text);
  font-weight: 700;
  opacity: .92;
}
.user-action-item .user-nick::before{
  content: '·';
  margin: 0 6px 0 2px;
  color: var(--muted2);
  font-weight: 700;
}
@media (max-width: 640px){
  .user-action-item .user-nick{ display: none; }
}


.login-btn{
  background-color: var(--primary);
  color: white !important;
  padding: 6px 16px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  transition: background-color .2s, transform .18s var(--ease-out), box-shadow .18s var(--ease-out);
  box-shadow: 0 1px 0 rgba(17,24,39,.04);
}
.login-btn:hover{ background-color: var(--primary-hover); }
@media (hover:hover){
  .login-btn:hover{ transform: translateY(-1px); box-shadow: 0 10px 24px rgba(17,24,39,.10); }
}
@media (prefers-reduced-motion: reduce){
  .login-btn{ transition: background-color .2s ease; }
}


.iconbtn{
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  border-radius: 16px;
  padding: 6px 10px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(17,24,39,.04);
}
.iconbtn:hover{ color: var(--primary); }
.iconbtn:active{ transform: translateY(1px); }


/* 昼夜模式切换（带状态文本） */
.theme-toggle{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  border-radius: var(--radius-lg);
  padding: 6px 12px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(17,24,39,.04);
  transition: color .2s, border-color .2s, transform .15s, box-shadow .18s;
}
.theme-toggle:hover{ color: var(--primary); }
@media (hover:hover){
  .theme-toggle:hover{ transform: translateY(-1px); box-shadow: 0 10px 22px rgba(17,24,39,.08); }
}
@media (prefers-reduced-motion: reduce){
  .theme-toggle{ transition: color .2s ease, border-color .2s ease; }
}
.theme-toggle:active{ transform: translateY(1px); }

.theme-toggle-icon{
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-block;
}
.theme-toggle-icon i{
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.65) rotate(-22deg);
  transition: opacity .2s ease, transform .25s ease;
}
html[data-theme="light"] .theme-toggle-icon .icon-sun{
  opacity: 1;
  transform: scale(1) rotate(0);
}
html[data-theme="dark"] .theme-toggle-icon .icon-moon{
  opacity: 1;
  transform: scale(1) rotate(0);
}

.theme-toggle-text{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.theme-toggle .theme-toggle-text [data-theme-state]{
  color: var(--text);
}
.theme-toggle-badge{
  display: none;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
}
.theme-toggle[data-theme-mode="auto"] .theme-toggle-badge{
  display: inline-flex;
}

.theme-toggle.is-animating .theme-toggle-icon{
  animation: themeTogglePop 320ms ease-out;
}
.theme-toggle.is-animating .theme-toggle-text{
  animation: themeToggleText 320ms ease-out;
}
@keyframes themeTogglePop{
  0%{ transform: scale(1); }
  45%{ transform: scale(1.15); }
  100%{ transform: scale(1); }
}
@keyframes themeToggleText{
  0%{ opacity: .7; transform: translateY(2px); }
  100%{ opacity: 1; transform: translateY(0); }
}

/* 移动端底部主题按钮适配 */
.bottom-nav-item .theme-toggle-icon{
  width: 18px;
  height: 18px;
}
.bottom-nav-item .theme-toggle-icon i{
  width: 18px;
  height: 18px;
  font-size: 18px;
}

@media (max-width: 640px){
  .theme-toggle .theme-toggle-text{ display: none; }
}

/* 兼容旧版按钮 */
.pill{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 1px 0 rgba(17,24,39,.04);
}
.pill.primary{
  background: var(--primary);
  border-color: transparent;
  color: white;
}
.pill.ghost{ background: transparent; }
.pill:active{ transform: translateY(1px); }



/* 标签导航 */
.tab-nav{
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
  position: relative;
  scroll-snap-type: x proximity;
}
.tab-nav::-webkit-scrollbar{ height: 3px; }
.tab-nav::-webkit-scrollbar-thumb{ background-color: rgba(209,213,219,.8); }

/* Subtle edge fades to hint horizontal scroll */
.tab-nav::before,
.tab-nav::after{
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  pointer-events: none;
  z-index: 1;
}
.tab-nav::before{
  left: 0;
  background: linear-gradient(to right, var(--card), rgba(255,255,255,0));
}
.tab-nav::after{
  right: 0;
  background: linear-gradient(to left, var(--card), rgba(255,255,255,0));
}
html[data-theme="dark"] .tab-nav::before{
  background: linear-gradient(to right, var(--card), rgba(0,0,0,0));
}
html[data-theme="dark"] .tab-nav::after{
  background: linear-gradient(to left, var(--card), rgba(0,0,0,0));
}

.tabs{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 100%;
  padding: 6px 4px;
  position: relative;
  z-index: 2;
}
.tab{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  scroll-snap-align: start;
  transition: background-color .18s var(--ease-out), color .18s var(--ease-out), border-color .18s var(--ease-out), transform .15s var(--ease-out);
}
.tab::after{
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  opacity: .9;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .22s var(--ease-out);
}
.tab:hover{ color: var(--text); background-color: rgba(59,130,246,.06); border-color: rgba(59,130,246,.14); }
html[data-theme="dark"] .tab:hover{ background-color: rgba(96,165,250,.08); border-color: rgba(96,165,250,.16); }
.tab:hover::after{ transform: scaleX(.6); }
.tab.active{ color: var(--text); background-color: rgba(59,130,246,.10); border-color: rgba(59,130,246,.20); }
html[data-theme="dark"] .tab.active{ background-color: rgba(96,165,250,.12); border-color: rgba(96,165,250,.18); }
.tab.active::after{ transform: scaleX(1); }
.tab:active{ transform: translateY(1px); }


/* 主内容布局 */
.main-content{
  display: flex;
  margin-top: 10px;
  gap: 15px;
  min-height: calc(100vh - 150px);
}
.left-content{ flex: 1; min-width: 0; }
.right-content{ width: 300px; flex-shrink: 0; }

@media (max-width: 980px){
  .main-content{ flex-direction: column; }
  .right-content{ width: auto; }
  .search-box{ max-width: 100%; margin: 0 8px; }
}

@media (max-width: 640px){
  .search-box{ display:none; }
  .brand-text{ font-size: 16px; }
  .user-action-item .text{ display:none; }
  .container{ padding-bottom: 96px; }
}

/* 通用模块/卡片 */
.module, .card{
  background-color: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 15px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.card.pad{ padding: 0; } /* 改为由 module-body 控制 */
.module-header, .card-header{
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.module-title, .card-title{
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
  margin: 0;
}
.more-link{
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.more-link:hover{ color: var(--primary); }
.module-body{ padding: 0; }
.section-title{
  padding: 12px 16px 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

/* 顶部提示 */
.notice{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  margin: 12px 0;
}
.notice.danger{
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.06);
}

/* 列表（仿示例 post-item） */
.post-list{ padding: 0; }
.post-item{
  display: block;
  padding: 16px;
  border-bottom: 1px solid var(--border-weak);
  cursor: pointer;
  transition: background-color .2s;
  color: inherit;
}
.post-item:hover{ background-color: rgba(249,250,251,.85); }
html[data-theme="dark"] .post-item:hover{ background-color: rgba(255,255,255,.03); }
.post-item:last-child{ border-bottom: none; }

.post-item.sticky{ background-color: rgba(254,247,205,.85); }
html[data-theme="dark"] .post-item.sticky{ background-color: rgba(245,158,11,.10); }
.post-item.sticky:hover{ background-color: rgba(254,243,199,.95); }
html[data-theme="dark"] .post-item.sticky:hover{ background-color: rgba(245,158,11,.14); }

/* 精选（浅绿色） */
.post-item.essence{ background-color: rgba(209,250,229,.85); }
html[data-theme="dark"] .post-item.essence{ background-color: rgba(16,185,129,.10); }
.post-item.essence:hover{ background-color: rgba(167,243,208,.95); }
html[data-theme="dark"] .post-item.essence:hover{ background-color: rgba(16,185,129,.14); }

/* 独家（淡紫色） */
.post-item.exclusive{ background-color: rgba(237,233,254,.85); }
html[data-theme="dark"] .post-item.exclusive{ background-color: rgba(139,92,246,.10); }
.post-item.exclusive:hover{ background-color: rgba(221,214,254,.95); }
html[data-theme="dark"] .post-item.exclusive:hover{ background-color: rgba(139,92,246,.14); }

/* Pinned takes precedence when multiple flags are present */
.post-item.sticky, .post-item.sticky.essence, .post-item.sticky.exclusive, .post-item.sticky.essence.exclusive{ background-color: rgba(254,247,205,.85); }
html[data-theme="dark"] .post-item.sticky, html[data-theme="dark"] .post-item.sticky.essence, html[data-theme="dark"] .post-item.sticky.exclusive, html[data-theme="dark"] .post-item.sticky.essence.exclusive{ background-color: rgba(245,158,11,.10); }
.post-item.sticky:hover, .post-item.sticky.essence:hover, .post-item.sticky.exclusive:hover, .post-item.sticky.essence.exclusive:hover{ background-color: rgba(254,243,199,.95); }
html[data-theme="dark"] .post-item.sticky:hover, html[data-theme="dark"] .post-item.sticky.essence:hover, html[data-theme="dark"] .post-item.sticky.exclusive:hover, html[data-theme="dark"] .post-item.sticky.essence.exclusive:hover{ background-color: rgba(245,158,11,.14); }

.post-item-inner{
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.post-thumb{
  width: 112px;
  height: 74px;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(243,244,246,.9);
  border: 1px solid var(--border);
  flex: 0 0 auto;
}
html[data-theme="dark"] .post-thumb{ background: rgba(255,255,255,.04); }
.post-thumb img{ width:100%; height:100%; object-fit: cover; display:block; }
@media (max-width: 640px){
  .post-thumb{ width: 96px; height: 64px; }
}

.post-main{ min-width:0; flex:1; }
.post-badges{ display:flex; gap:6px; margin-bottom: 8px; flex-wrap: wrap; }
.post-badge{
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.post-badge.sticky{ background-color: var(--warning); color: white; }
.post-badge.essence{ background-color: rgba(16,185,129,.16); color: #065f46; border: 1px solid rgba(16,185,129,.22); }
html[data-theme="dark"] .post-badge.essence{ background-color: rgba(16,185,129,.18); color: #34d399; border-color: rgba(16,185,129,.28); }
.post-badge.exclusive{ background-color: rgba(139,92,246,.16); color: #5b21b6; border: 1px solid rgba(139,92,246,.22); }
html[data-theme="dark"] .post-badge.exclusive{ background-color: rgba(139,92,246,.18); color: #c4b5fd; border-color: rgba(139,92,246,.30); }
.post-badge.draft{ background-color: rgba(107,114,128,.18); color: var(--muted); }

.post-title{
  font-size: 16px;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}
.post-content{
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-footer{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.post-tags{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.post-tag, .badge{
  background-color: var(--border-weak);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}
.post-tag.active{
  background-color: rgba(59,130,246,.12);
  color: var(--primary);
  border: 1px solid rgba(59,130,246,.18);
}
.badge.primary{
  background-color: rgba(59,130,246,.12);
  color: var(--primary);
  border: 1px solid rgba(59,130,246,.18);
}

.post-stats{
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted2);
  font-size: 13px;
}
.post-stat{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 兼容旧版 post-card（用于搜索/标签页旧输出） */
.post-card{
  display:flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-weak);
}
.post-card:hover{ background-color: rgba(249,250,251,.85); }
html[data-theme="dark"] .post-card:hover{ background-color: rgba(255,255,255,.03); }
.post-card:last-child{ border-bottom: none; }
.post-cover{
  width: 112px;
  height: 74px;
  border-radius: var(--radius);
  overflow:hidden;
  background: rgba(243,244,246,.9);
  border: 1px solid var(--border);
  flex: 0 0 auto;
}
.post-cover img{ width:100%; height:100%; object-fit:cover; display:block; }
.post-main h3{ margin:0; font-size:16px; font-weight:700; line-height:1.25; }
.post-main p{ margin:6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow:hidden; }
.meta{ margin-top: 10px; color: var(--muted2); font-size: 13px; display:flex; gap: 12px; flex-wrap: wrap; }

/* 右侧热榜（仿示例 trending） */
.trending-list{ padding: 0 16px 16px; }
.trending-item{
  display:block;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-weak);
}
.trending-item:hover{ background-color: rgba(249,250,251,.75); }
html[data-theme="dark"] .trending-item:hover{ background-color: rgba(255,255,255,.03); }
.trending-item:last-child{ border-bottom: none; }
.trending-rank{
  display:inline-block;
  width: 18px;
  height: 18px;
  text-align:center;
  line-height:18px;
  background-color: var(--border-weak);
  border-radius: 4px;
  margin-right: 8px;
  font-size: 12px;
  color: var(--muted);
}
.trending-rank.top{
  background-color: rgba(254,226,226,.9);
  color: #dc2626;
}
html[data-theme="dark"] .trending-rank.top{
  background-color: rgba(239,68,68,.16);
  color: #f87171;
}
.trending-text{ color: var(--text); font-size: 14px; }
.trending-meta{ color: var(--muted2); font-size: 12px; margin-top: 4px; }

/* 文章详情 */
.post-body{ padding: 16px; }
.post-body h1{ margin: 0 0 10px; font-size: 20px; color: var(--text); }
.post-meta{
  display:flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}
.content{
  line-height: 1.75;
  font-size: 15px;
  word-break: break-word;
  color: var(--text-weak);
}
.content a{ color: var(--primary); text-decoration: underline; }
.content img{
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.content pre{
  overflow:auto;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(243,244,246,.75);
}
html[data-theme="dark"] .content pre{ background: rgba(255,255,255,.04); }
.content code{
  font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  font-size: .95em;
}
.content blockquote{
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 4px solid var(--primary);
  background: rgba(59,130,246,.08);
  border-radius: var(--radius);
}

/* 附件 */
.attachments{
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.attachments ul{
  list-style: none;
  margin-top: 10px;
  display: grid;
  gap: 10px;
}
.file{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(243,244,246,.75);
}
html[data-theme="dark"] .file{ background: rgba(255,255,255,.04); }
.file-left{ display:flex; align-items:center; gap: 10px; min-width:0; }
.file-icon{
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: var(--card);
  border: 1px solid var(--border);
}
.file-name{
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 52vw;
}
.file-meta{ color: var(--muted2); font-size: 12px; margin-top: 3px; }
.file-right{ flex: 0 0 auto; }

/* 页脚 */
.footer{
  border-top: 1px solid var(--border);
  padding: 18px 0;
  margin-top: 20px;
  background: transparent;
}
.footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
  display:flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.small{ font-size: 12px; }
.muted{ color: var(--muted); }

.footer-link{
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  line-height: 1.4;
}
.footer-link:hover{ color: var(--text); text-decoration: underline; }
.footer-sep{ color: var(--muted2); font-size: 12px; }

@media (max-width: 640px){
  .footer-inner{ justify-content: center; text-align: center; }
  .footer-left{ align-items: center; }
  .footer-right{ justify-content: center; }
}

/* 底部导航（移动端） */
.bottom-nav{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--card);
  border-top: 1px solid var(--border);
  display: none;
  justify-content: space-around;
  padding: 10px 0;
  z-index: 100;
}
.bottom-nav-item{
  display:flex;
  flex-direction: column;
  align-items: center;
  color: var(--muted2);
  text-decoration: none;
  font-size: 11px;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.bottom-nav-item i{ font-size: 18px; }
.bottom-nav-item.active{ color: var(--primary); }
@media (max-width: 640px){
  .bottom-nav{ display:flex; }
}

/* 表单 */
.field{ margin: 10px 0; }
.label{ font-weight: 800; font-size: 13px; margin-bottom: 6px; display:block; color: var(--text); }
.input, .textarea, .select{
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(209,213,219,.95);
  background: rgba(249,250,251,.9);
  color: var(--text);
  outline: none;
  transition: all .2s;
}
html[data-theme="dark"] .input,
html[data-theme="dark"] .textarea,
html[data-theme="dark"] .select{
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}
.textarea{ min-height: 120px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus{
  border-color: var(--primary);
  background-color: var(--card);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.help{ margin-top: 6px; color: var(--muted); font-size: 12px; }

/* 按钮 */
.btnrow{ display:flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-weight: 800;
  cursor:pointer;
  transition: background-color .2s, border-color .2s;
}
.btn:hover{ border-color: rgba(59,130,246,.35); }
.btn.primary{
  background: var(--primary);
  color: white;
  border-color: transparent;
}
.btn.primary:hover{ background: var(--primary-hover); }
.btn.danger{
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.25);
  color: var(--danger);
}
.btn:active{ transform: translateY(1px); }

/* 表格 */
.table{
  width: 100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
}
.table th, .table td{
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}
.table th{
  font-size: 12px;
  color: var(--muted);
  font-weight: 900;
  letter-spacing: .3px;
}
.table tr:last-child td{ border-bottom: none; }
.table a{ color: var(--primary); }

/* 简易编辑器 */
.editor-toolbar{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  background: rgba(243,244,246,.75);
}
html[data-theme="dark"] .editor-toolbar{ background: rgba(255,255,255,.04); }
.toolbtn{
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
}
.toolbtn:hover{ border-color: rgba(59,130,246,.35); }
.toolbtn:active{ transform: translateY(1px); }
.editor-area, .editor{
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 12px;
  min-height: 260px;
  background: var(--card);
  color: var(--text);
  outline: none;
}
.editor-area img, .editor img{
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.emoji-panel{
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 10px;
  background: rgba(249,250,251,.9);
  display: none;
}
html[data-theme="dark"] .emoji-panel{ background: rgba(255,255,255,.04); }
.emoji-panel button{
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  padding: 6px;
  border-radius: 8px;
}
.emoji-panel button:hover{
  background: rgba(59,130,246,.12);
}

/* 小工具 */
.kbd{
  font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  font-size: 12px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 2px 6px;
  background: var(--card);
  color: var(--muted);
}
.link{ color: var(--primary); }
.link:hover{ text-decoration: underline; }


/* ===== 兼容旧模板（后台/安装页） ===== */
.pad{ padding: 16px; }
.card.pad{ padding: 16px; }
.card.pad .card-header{
  margin: -16px -16px 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.card-sub{
  margin-top: 6px;
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.grid{
  display: grid;
  gap: 12px;
}
.grid.two{
  grid-template-columns: 1fr 360px;
  align-items: start;
}
@media (max-width: 980px){
  .grid.two{ grid-template-columns: 1fr; }
}

/* emoji 面板补齐 */
.emoji-panel.open{ display:block; }
.emoji-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.emoji-grid{
  display:grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
}
@media (max-width: 640px){
  .emoji-grid{ grid-template-columns: repeat(8, 1fr); }
}

/* footer 子区域 */
.footer-left, .footer-right{ display:flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.footer-left{ align-items: flex-start; flex-direction: column; gap: 6px; }

/* 安装页小宽度容器 */
.narrow{ max-width: 760px; margin: 0 auto; }


/* Admin UI Enhancements */
.admin-page-head{margin-bottom:12px}
.admin-actions-nav .user-action-item.is-active{background:var(--card); border:1px solid var(--border); box-shadow:0 6px 18px rgba(0,0,0,.08)}
.admin-plugin-list{display:grid; gap:12px}
.admin-plugin-item{display:flex; gap:12px; align-items:flex-start; justify-content:space-between; border:1px solid var(--border); border-radius:16px; padding:14px; background:var(--card)}
.admin-plugin-title{display:flex; gap:8px; align-items:center; flex-wrap:wrap}
.admin-plugin-desc{margin-top:8px; color:var(--text); opacity:.92; line-height:1.55}
.admin-plugin-actions{display:flex; gap:8px; align-items:center; flex-wrap:wrap}
.admin-plugin-main{min-width:0; flex:1}
.admin-plugin-main code{padding:2px 6px; border-radius:8px; background:rgba(127,127,127,.12)}

.admin-bottom-nav{
  position:fixed;
  left:0; right:0; bottom:0;
  display:none;
  gap:0;
  padding:10px 12px calc(10px + env(safe-area-inset-bottom));
  background:color-mix(in srgb, var(--bg) 92%, transparent);
  border-top:1px solid var(--border);
  backdrop-filter: blur(10px);
  z-index:999;
}
.admin-bottom-item{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  text-decoration:none;
  color:var(--text);
  padding:10px 8px;
  border-radius:14px;
}
.admin-bottom-item i{font-size:18px}
.admin-bottom-item span{font-size:12px; opacity:.9}
.admin-bottom-item.is-active{background:var(--card); border:1px solid var(--border)}
@media (max-width: 820px){
  .admin .admin-bottom-nav{display:flex}
  .admin{padding-bottom:86px}
  .admin .admin-actions-nav{display:none}
}

/* -----------------------------
   Organizations (组织页面)
   ----------------------------- */
.orgs-search{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-top: 12px;
}
.orgs-search .input{ flex: 1; min-width: 220px; }
.orgs-filters{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top: 12px;
}

.org-item{
  display:block;
  padding: 14px 16px;
  border-top: 1px solid var(--border-weak);
  color: inherit;
  text-decoration: none;
  transition: background-color .2s;
}
.org-item:hover{ background-color: rgba(249,250,251,.85); }
html[data-theme="dark"] .org-item:hover{ background-color: rgba(255,255,255,.03); }

.org-item-inner{ display:flex; gap:12px; align-items:flex-start; }
.org-logo{
  width:56px; height:56px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow:hidden;
  background: rgba(243,244,246,.9);
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
}
html[data-theme="dark"] .org-logo{ background: rgba(255,255,255,.04); }
.org-logo img{ width:100%; height:100%; object-fit: cover; display:block; }
.org-logo i{ font-size: 20px; color: var(--muted); }

.org-main{ min-width:0; flex: 1; }
.org-title-row{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.org-title{ font-weight: 800; font-size: 15px; }
.org-meta{ display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.org-summary{ color: var(--muted); margin-top: 6px; line-height: 1.5; }
.org-tags{ margin-top: 8px; display:flex; gap:6px; flex-wrap:wrap; }
.org-links{ margin-top: 6px; }

.org-detail-head{ display:flex; gap:14px; align-items:flex-start; }
.org-detail-logo{
  width:72px; height:72px;
  border-radius: var(--radius);
  border:1px solid var(--border);
  overflow:hidden;
  background: rgba(243,244,246,.9);
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
}
html[data-theme="dark"] .org-detail-logo{ background: rgba(255,255,255,.04); }
.org-detail-logo img{ width:100%; height:100%; object-fit: cover; display:block; }
.org-detail-logo i{ font-size: 28px; color: var(--muted); }

.org-detail-main{ flex:1; min-width:0; }
.org-detail-title{ font-size: 20px; font-weight: 900; }
.org-detail-meta{ margin-top: 8px; display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.org-detail-actions{ margin-top: 12px; display:flex; gap:10px; flex-wrap:wrap; }

.org-section{ margin-top: 8px; }
.org-rich{ line-height: 1.75; }

.org-links-grid{ display:flex; gap:10px; flex-wrap:wrap; }
.org-kv{ border:1px solid var(--border); border-radius: var(--radius); overflow:hidden; }
.org-kv-row{ display:flex; gap:12px; padding: 10px 12px; border-bottom: 1px solid var(--border-weak); }
.org-kv-row:last-child{ border-bottom:none; }
.org-kv-k{ width: 110px; flex: 0 0 auto; color: var(--muted); font-weight: 700; }
.org-kv-v{ flex:1; min-width:0; }

@media (max-width: 640px){
  .org-logo{ width: 52px; height: 52px; }
  .org-detail-head{ flex-direction: column; }
  .org-detail-logo{ width: 96px; height: 96px; }
}


/* --- UI Enhancements (2026-01) --- */

/* Small icon button (for copy, tiny actions) */
.copybtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, background-color .14s ease, color .14s ease;
  flex: 0 0 auto;
}
.copybtn i{ font-size: 14px; }
.copybtn:hover{ border-color: rgba(59,130,246,.35); background: var(--border-weak); color: var(--text); }
.copybtn:active{ transform: translateY(1px) scale(.99); }
.copybtn.is-copied{ border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.08); color: rgba(34,197,94,.95); }

/* Inline meta line (wrap-friendly) */
.meta-line{
  display:flex;
  flex-wrap:wrap;
  gap: 8px 10px;
  align-items:center;
}
.meta-line .k{ color: var(--muted); }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

/* Confirm modal (replaces window.confirm for a consistent UI) */
.rw-modal{ position:fixed; inset:0; z-index: 9998; display:none; }
.rw-modal[aria-hidden="false"]{ display:block; }
.rw-modal__backdrop{ position:absolute; inset:0; background: rgba(17,24,39,.18); backdrop-filter: saturate(120%) blur(2px); }
html[data-theme="dark"] .rw-modal__backdrop{ background: rgba(0,0,0,.42); }
.rw-modal__dialog{
  position:relative;
  width: min(520px, calc(100vw - 24px));
  margin: calc(env(safe-area-inset-top) + 12vh) auto 0;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-hover);
  transform: translateY(8px) scale(.99);
  opacity: .001;
  transition: transform .20s var(--ease-out), opacity .18s ease;
}
.rw-modal.is-open .rw-modal__dialog{ transform: translateY(0) scale(1); opacity: 1; }
.rw-modal__head{ padding: 14px 16px 0; display:flex; align-items:flex-start; justify-content:space-between; gap: 10px; }
.rw-modal__title{ font-weight: 900; color: var(--text); letter-spacing: .2px; }
.rw-modal__close{ width: 32px; height: 32px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--muted); cursor:pointer; }
.rw-modal__close:hover{ border-color: rgba(59,130,246,.35); background: var(--border-weak); color: var(--text); }
.rw-modal__body{ padding: 10px 16px 0; color: var(--text-weak); line-height: 1.6; }
.rw-modal__actions{ padding: 14px 16px 16px; display:flex; gap: 10px; justify-content:flex-end; flex-wrap:wrap; }
.rw-modal__actions .btn{ min-width: 110px; }
@media (max-width: 520px){
  .rw-modal__dialog{ margin-top: calc(env(safe-area-inset-top) + 10vh); }
  .rw-modal__actions{ flex-direction: column-reverse; align-items: stretch; }
  .rw-modal__actions .btn{ width: 100%; }
}
@media (prefers-reduced-motion: reduce){
  .rw-modal__dialog{ transition:none; transform:none; opacity:1; }
}

/* Responsive tables (card-like on small screens). Requires JS to set td[data-label]. */
@media (max-width: 640px){
  .table.rw-responsive thead{ display:none; }
  .table.rw-responsive,
  .table.rw-responsive tbody,
  .table.rw-responsive tr{
    display:block;
    width:100%;
  }
  .table.rw-responsive{
    border: 0;
    background: transparent;
  }
  .table.rw-responsive tr{
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: var(--radius-xl);
    overflow:hidden;
    margin: 10px 0;
    box-shadow: var(--shadow);
  }
  .table.rw-responsive td{
    display:flex;
    justify-content:space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-weak);
    text-align: left;
  }
  .table.rw-responsive td:last-child{ border-bottom: 0; }
  .table.rw-responsive td::before{
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 900;
    color: var(--muted);
    padding-right: 10px;
    max-width: 42%;
  }
  .table.rw-responsive td > *{ max-width: 58%; }
  .table.rw-responsive td.actions,
  .table.rw-responsive td[data-label="操作"]{
    justify-content:flex-end;
  }
  .table.rw-responsive td.actions::before,
  .table.rw-responsive td[data-label="操作"]::before{ content:''; display:none; }
}


/* Toasts (shared) */
.rw-toast-stack{position:fixed;right:16px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:9999;display:flex;flex-direction:column;gap:10px;max-width:min(420px, calc(100vw - 32px));}
@media (max-width:640px){.rw-toast-stack{right:12px;bottom:calc(84px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px);}}
.rw-toast{display:flex;gap:10px;align-items:flex-start;padding:12px 12px;border-radius:16px;border:1px solid var(--border);background:var(--card);box-shadow:var(--shadow-hover);opacity:0;transform:translateY(6px);transition:opacity .16s ease, transform .22s var(--ease-out);}
.rw-toast.is-show{opacity:1;transform:translateY(0);}
.rw-toast.is-hiding{opacity:0;transform:translateY(-6px);}
.rw-toast__icon{margin-top:1px;color:var(--muted);} 
.rw-toast__msg{font-size:14px;line-height:1.5;word-break:break-word;}
.rw-toast__close{margin-left:auto;width:32px;height:32px;border-radius:12px;border:0;background:transparent;color:var(--muted);cursor:pointer;display:flex;align-items:center;justify-content:center;}
.rw-toast__close:hover{background:rgba(17,24,39,.06);color:var(--text);}
html[data-theme=dark] .rw-toast{box-shadow:0 14px 32px rgba(0,0,0,.40);}
html[data-theme=dark] .rw-toast__close:hover{background:rgba(255,255,255,.06);}
.rw-toast--success{border-color:rgba(34,197,94,.32);}
.rw-toast--success .rw-toast__icon{color:rgba(34,197,94,.92);}
.rw-toast--danger{border-color:rgba(239,68,68,.32);}
.rw-toast--danger .rw-toast__icon{color:rgba(239,68,68,.92);}
.rw-toast--warning{border-color:rgba(234,179,8,.35);}
.rw-toast--warning .rw-toast__icon{color:rgba(234,179,8,.95);}


/* ---------------------------
 * 资源页：高密度列表 + 分类切换
 * --------------------------- */
.rw-pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.rw-pill{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border:1px solid var(--border-weak);
  border-radius:999px;
  font-size:13px;
  color:inherit;
  background: rgba(255,255,255,.6);
}
html[data-theme="dark"] .rw-pill{ background: rgba(255,255,255,.03); }
.rw-pill.active{
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.rw-table-wrap{
  width:100%;
  overflow:auto;
  border:1px solid var(--border-weak);
  border-radius: 12px;
  background: rgba(255,255,255,.7);
}
html[data-theme="dark"] .rw-table-wrap{ background: rgba(255,255,255,.02); }

.rw-table{
  width:100%;
  border-collapse: collapse;
  font-size: 13px;
}
.rw-table th, .rw-table td{
  padding:10px 12px;
  border-bottom: 1px solid var(--border-weak);
  vertical-align: top;
  text-align:left;
}
.rw-table thead th{
  font-weight: 700;
  background: rgba(249,250,251,.85);
}
html[data-theme="dark"] .rw-table thead th{ background: rgba(255,255,255,.03); }

.rw-table--dense th, .rw-table--dense td{ padding:8px 10px; }
.rw-row-title{ display:flex; align-items:center; gap:8px; line-height: 1.25; }
.rw-badge{
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(245,158,11,.14);
  border: 1px solid rgba(245,158,11,.32);
}
.rw-tag{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid var(--border-weak);
  background: rgba(255,255,255,.55);
  font-size:12px;
  white-space:nowrap;
}
html[data-theme="dark"] .rw-tag{ background: rgba(255,255,255,.03); }
.rw-link{ color: inherit; }
.rw-muted{ color: var(--muted); font-size: 12px; margin-top: 2px; }
.rw-ellipsis{
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  max-width: 600px;
}
@media (max-width: 900px){
  .rw-ellipsis{ max-width: 320px; }
}
