/* =========================================================================
 * style.css —— AI 造物馆
 * 暗黑玻璃霓虹（默认）/ 浅色两套主题，全部 CSS 变量驱动。
 * 结构：变量 → 基础 → 背景层 → 导航 → 通用组件 → 首页 → 列表 → 卡片
 *      → 详情 → 投稿 → 管理 → 页脚 / Toast → 响应式
 * ========================================================================= */

/* ----------------------------- 变量 ----------------------------- */
:root {
  --bg:            #070709;
  --bg-soft:       #0b0b11;
  --surface:       rgba(255,255,255,.04);
  --surface-2:     rgba(255,255,255,.07);
  --surface-solid: #121219;
  --text:          #f4f4f7;
  --text-muted:    #9a9aae;
  --text-faint:    #6a6a7e;
  --border:        rgba(255,255,255,.09);
  --border-strong: rgba(255,255,255,.18);

  --violet: #8b7cff;
  --cyan:   #67e8f9;
  --pink:   #e9b8ff;
  --accent:       var(--violet);
  --accent-soft:  rgba(139,124,255,.14);
  --accent-text:  #b9aeff;
  --glow:         rgba(139,124,255,.42);
  --grad: linear-gradient(110deg,#c7c0ff 0%,#a78bfa 42%,#38bdf8 78%,#c7c0ff 100%);

  --shadow-sm:    0 1px 2px rgba(0,0,0,.5);
  --shadow:       0 10px 30px rgba(0,0,0,.45);
  --shadow-hover: 0 18px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(139,124,255,.35);

  --radius:       16px;
  --radius-sm:    10px;
  --radius-lg:    22px;
  --radius-pill:  999px;
  --nav-h:        62px;
  --maxw:         1200px;
  --ease:         cubic-bezier(.22,.61,.36,1);
  --sans: 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;

  --orb-opacity: .5;
  --grain-opacity: .035;
  --vignette-opacity: 1;
  --fx-opacity: 1;
  --grid-opacity: 1;
}

[data-theme="light"] {
  --bg:            #f6f7fb;
  --bg-soft:       #eef0f8;
  --surface:       #ffffff;
  --surface-2:     #f2f3fa;
  --surface-solid: #ffffff;
  --text:          #14161f;
  --text-muted:    #4a5168;
  --text-faint:    #858ca6;
  --border:        #e6e8f0;
  --border-strong: #d3d7e6;
  --accent:        #5b46e8;
  --accent-soft:   #eee9ff;
  --accent-text:   #4a35d8;
  --grad:          linear-gradient(110deg,#6d5cf0 0%,#7c3aed 42%,#0891b2 78%,#6d5cf0 100%);
  --glow:          rgba(120,100,240,.20);
  --shadow-sm:     0 1px 2px rgba(30,40,80,.06);
  --shadow:        0 8px 26px rgba(30,40,80,.08);
  --shadow-hover:  0 16px 40px rgba(30,40,80,.14);

  --orb-opacity: 0;
  --grain-opacity: 0;
  --vignette-opacity: 0;
  --fx-opacity: 0;
  --grid-opacity: .5;
}

/* ----------------------------- 基础 ----------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .35s var(--ease), color .35s var(--ease);
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
::selection { background: var(--violet); color: #0a0a0f; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }
.muted { color: var(--text-muted); }

/* ----------------------------- 背景层 ----------------------------- */
.orb { position: fixed; border-radius: 50%; filter: blur(90px); opacity: var(--orb-opacity); z-index: -3; pointer-events: none; }
.orb-a { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: radial-gradient(circle, rgba(139,124,255,.55), transparent 64%); animation: drift1 22s ease-in-out infinite; }
.orb-b { width: 40vw; height: 40vw; right: -10vw; top: 2vw; background: radial-gradient(circle, rgba(103,232,249,.4), transparent 64%); animation: drift2 26s ease-in-out infinite; }
.orb-c { width: 38vw; height: 38vw; left: 28vw; top: 48vw; background: radial-gradient(circle, rgba(233,184,255,.3), transparent 64%); animation: drift1 30s ease-in-out infinite reverse; }
@keyframes drift1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(4vw,5vw); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-4vw,3vw); } }
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: var(--grid-opacity);
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
}
[data-theme="light"] .bg-grid { background-image: linear-gradient(rgba(20,30,60,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(20,30,60,.05) 1px, transparent 1px); }
#fx { position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: var(--fx-opacity); }
.vignette { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--vignette-opacity); background: radial-gradient(120% 80% at 50% 0%, transparent 46%, rgba(0,0,0,.55)); }
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px; mix-blend-mode: overlay;
}

/* ----------------------------- 导航 ----------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--border);
}
.nav-inner { max-width: var(--maxw); height: 100%; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; white-space: nowrap; letter-spacing: .5px; }
.brand-logo { font-size: 20px; filter: drop-shadow(0 0 8px var(--glow)); }
.brand-name { background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: shimmer 9s ease-in-out infinite; }
@keyframes shimmer { 0%,55% { background-position: 130% 0; } 78%,100% { background-position: -40% 0; } }

.search { position: relative; flex: 1; max-width: 420px; }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; fill: none; stroke: var(--text-faint); stroke-width: 2; stroke-linecap: round; }
#globalSearch {
  width: 100%; height: 40px; padding: 0 38px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-pill);
  color: var(--text); font-size: 14px; outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
#globalSearch::placeholder { color: var(--text-faint); }
#globalSearch:focus { border-color: var(--violet); background: var(--surface-solid); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 22px var(--glow); }
.search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; color: var(--text-muted); font-size: 18px; line-height: 1; }
.search-clear:hover { background: var(--surface-2); color: var(--text); }

.suggest {
  position: absolute; top: 48px; left: 0; right: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-hover); overflow: hidden;
  max-height: 380px; overflow-y: auto;
}
.suggest-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--border); }
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover { background: var(--accent-soft); }
.suggest-thumb { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-2); }
.suggest-meta { min-width: 0; }
.suggest-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-sub { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-empty { padding: 16px; text-align: center; color: var(--text-muted); font-size: 13px; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links > a, .nav-drop > a {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: var(--radius-sm); font-size: 14px; color: var(--text-muted);
  transition: background .2s, color .2s; white-space: nowrap;
}
.nav-links > a:hover, .nav-drop > a:hover { background: var(--surface-2); color: var(--text); }
.nav-links a.active { color: var(--accent-text); background: var(--accent-soft); font-weight: 600; }
.caret { font-size: 10px; opacity: .7; }
.nav-drop { position: relative; }
.nav-drop-panel {
  position: absolute; top: 100%; left: 0; min-width: 300px; padding: 10px;
  display: none; grid-template-columns: 1fr 1fr; gap: 2px;
  background: color-mix(in srgb, var(--surface-solid) 95%, transparent);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-hover); backdrop-filter: blur(18px);
}
.nav-drop.open .nav-drop-panel { display: grid; }
.nav-drop-panel a { padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text-muted); }
.nav-drop-panel a:hover { background: var(--accent-soft); color: var(--accent-text); }
.drop-sep { grid-column: 1 / -1; height: 1px; background: var(--border); margin: 6px 2px; }

.nav-cta { background: linear-gradient(120deg, var(--violet), #7c6cf0) !important; color: #0a0a0f !important; font-weight: 700; box-shadow: 0 6px 20px var(--glow); }
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 28px var(--glow); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); font-size: 15px; transition: transform .25s var(--ease), border-color .2s; }
.theme-toggle:hover { transform: rotate(18deg); border-color: var(--violet); }
.ico-moon { display: inline; } .ico-sun { display: none; }
[data-theme="dark"] .ico-sun { display: inline; }
[data-theme="dark"] .ico-moon { display: none; }
.menu-btn { display: none; width: 38px; height: 38px; border-radius: 50%; font-size: 18px; background: var(--surface-2); border: 1px solid var(--border); }

/* ----------------------------- 语言切换 ----------------------------- */
.lang-switch { position: relative; }
.lang-btn {
  height: 38px; min-width: 38px; padding: 0 10px; border-radius: 19px;
  display: flex; align-items: center; gap: 5px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; font-weight: 700; letter-spacing: .3px;
  transition: color .2s, border-color .2s, background .2s;
}
.lang-btn:hover, .lang-switch.open .lang-btn { color: var(--text); border-color: var(--violet); }
.lang-cur { line-height: 1; }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  min-width: 186px; padding: 6px; border-radius: 14px;
  /* 浮层要挡住下面的内容：--surface 深色下只有 4% 白，叠 blur 后页面标题会透上来 */
  background: var(--surface-solid);
  background: color-mix(in srgb, var(--surface-solid) 96%, transparent);
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .38);
  backdrop-filter: blur(14px);
  animation: pop .18s var(--ease);
  /* 语言多了要能滚，否则小屏上最后几项点不到 */
  max-height: min(72vh, 430px); overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin;
}
.lang-menu::-webkit-scrollbar { width: 6px; }
.lang-menu::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.lang-menu button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px; border-radius: 9px; font-size: 13px; color: var(--text-muted); text-align: left;
}
.lang-menu button:hover { background: var(--surface-2); color: var(--text); }
.lang-menu button.on { color: var(--text); background: var(--accent-soft); }
.lang-menu button.on .lm-name { font-weight: 700; }
.lm-code { font-size: 10px; letter-spacing: .5px; color: var(--text-muted); opacity: .75; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

/* ----------------------------- 布局 / 通用 ----------------------------- */
.app { max-width: var(--maxw); margin: 0 auto; padding: 12px 20px 64px; min-height: 60vh; position: relative; z-index: 1; }
.view { animation: fade .35s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.section { margin-top: 22px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 19px; font-weight: 800; letter-spacing: -.3px; position: relative; padding-left: 14px; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 3px; border-radius: 3px; background: var(--grad); }
.section-head .sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.section-head a.more { font-size: 13px; color: var(--accent-text); font-weight: 600; white-space: nowrap; }
.section-head a.more:hover { text-shadow: 0 0 12px var(--glow); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: transform .15s var(--ease), box-shadow .2s, border-color .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(120deg, var(--violet), #7c6cf0); color: #0a0a0f; box-shadow: 0 6px 22px var(--glow); font-weight: 700; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px var(--glow); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--violet); color: var(--accent-text); transform: translateY(-2px); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13.5px; }

.empty { text-align: center; padding: 70px 20px; color: var(--text-muted); }
.empty .em-ico { font-size: 46px; filter: drop-shadow(0 0 16px var(--glow)); }
.empty h3 { margin: 14px 0 6px; font-size: 18px; color: var(--text); }
.empty p { font-size: 14px; margin-bottom: 18px; }

.chip { font-size: 12px; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

/* 骨架屏 */
.sk-card { break-inside: avoid; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 0 14px; overflow: hidden; }
.sk-cover { background: var(--surface-2); animation: pulse 1.4s ease-in-out infinite; }
.sk-cover.land { aspect-ratio: 16/9; } .sk-cover.port { aspect-ratio: 3/4; }
.sk-line { height: 10px; margin: 12px 14px 0; border-radius: 6px; background: var(--surface-2); animation: pulse 1.4s ease-in-out infinite; }
.sk-line.w70 { width: 70%; } .sk-line.w40 { width: 40%; }
@keyframes pulse { 0%,100% { opacity: .45; } 50% { opacity: .9; } }
.skeleton-line { padding: 40px; text-align: center; color: var(--text-muted); }

/* ----------------------------- 首页 Hero ----------------------------- */
.hero { position: relative; padding: 12px 0 2px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -20% -10% auto -10%; height: 420px; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx,50%) var(--my,30%), rgba(139,124,255,.18), transparent 65%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; }
.hero-inner.has-pick { grid-template-columns: minmax(0, 1fr) 328px; gap: 30px; }
.hero-copy { min-width: 0; }
.hero-pick { min-width: 0; }
.hpick-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--accent-text); margin-bottom: 7px; }
.hpick-card { display: flex; gap: 12px; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .22s var(--ease), border-color .2s, box-shadow .2s; }
.hpick-card:hover { transform: translateY(-3px); border-color: var(--violet); box-shadow: 0 12px 30px var(--glow); }
.hpick-thumb { display: block; position: relative; width: 84px; flex: none; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.hpick-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hpick-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 2px 2px 2px 0; }
.hpick-name { font-size: 14px; font-weight: 700; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hpick-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hpick-foot { margin-top: auto; font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-kicker {
  display: inline-block; max-width: 100%;
  font-size: 12.5px; line-height: 1.55;
  color: var(--accent-text); background: var(--accent-soft); border: 1px solid transparent;
  padding: 5px 12px; border-radius: var(--radius-pill); margin-bottom: 8px;
  text-wrap: pretty;
}
.hero h1 { font-size: clamp(27px, 4.1vw, 43px); font-weight: 900; line-height: 1.16; letter-spacing: -1px; text-wrap: balance; }
.hero h1 .hl { background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: shimmer 9s ease-in-out infinite; }
.hero-sub { margin-top: 9px; font-size: 14.5px; color: var(--text-muted); max-width: 560px; line-height: 1.65; }
.hero-cta-row { display: flex; align-items: center; gap: 20px; margin-top: 15px; flex-wrap: wrap; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }
.hero-stats .stat b { color: var(--accent-text); font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.hero-stats .dot { color: var(--text-faint); }

/* 形态入口 */
.entry-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.entry-card {
  display: flex; align-items: center; gap: 10px; padding: 10px 13px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  min-width: 0;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.entry-card:hover { transform: translateY(-3px); border-color: var(--violet); box-shadow: 0 10px 26px var(--glow); }
.fc-ico { width: 32px; height: 32px; flex: none; display: grid; place-items: center; font-size: 16px; border-radius: 9px; background: var(--tint, var(--surface-2)); border: 1px solid var(--border); }
.fc-main { display: flex; flex-direction: column; min-width: 0; }
.fc-name { font-size: 14px; font-weight: 700; white-space: nowrap; }
.fc-desc { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-count { margin-left: auto; font-size: 11.5px; color: var(--text-faint); white-space: nowrap; }

/* ----------------------------- 列表 ----------------------------- */
.list-head { margin-bottom: 4px; }
.list-title { font-size: 26px; font-weight: 800; letter-spacing: -.4px; }
.list-sub { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.filter-bar {
  margin: 18px 0 22px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px;
}
.filter-line { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.filter-label { font-size: 12.5px; color: var(--text-faint); font-weight: 600; padding-top: 7px; min-width: 30px; }
.tabs { display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; }
.tab {
  font-size: 13px; padding: 6px 13px; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border);
  transition: all .18s;
}
.tab:hover { color: var(--text); border-color: var(--violet); }
.tab.active { background: linear-gradient(120deg, var(--violet), #7c6cf0); color: #0a0a0f; border-color: transparent; font-weight: 700; box-shadow: 0 4px 16px var(--glow); }
.tab-sm { font-size: 12.5px; padding: 5px 11px; }
.filter-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; border-top: 1px dashed var(--border); min-width: 0; }
.result-meta { font-size: 12.5px; color: var(--text-muted); }
.sorter { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: var(--radius-pill); border: 1px solid var(--border); }
.sort { font-size: 12.5px; padding: 4px 14px; border-radius: var(--radius-pill); color: var(--text-muted); }
.sort.active { background: var(--surface-solid); color: var(--accent-text); font-weight: 700; box-shadow: var(--shadow-sm); }
.load-more-wrap { text-align: center; margin-top: 26px; }

/* ----------------------------- 卡片（瀑布流） ----------------------------- */
.masonry { columns: 3; column-gap: 18px; }
.masonry .card { break-inside: avoid; margin: 0 0 18px; display: block; }

.card {
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .28s var(--ease), box-shadow .28s, border-color .2s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: rgba(139,124,255,.45); }
.card:focus-visible { outline: 2px solid var(--violet); }

.cover { position: relative; overflow: hidden; background: var(--cover-tint, var(--surface-2)); }
.cover img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.card:hover .cover img { transform: scale(1.05); }
.cover-fallback { position: absolute; inset: 0; z-index: 0; display: grid; place-content: center; gap: 6px; text-align: center; padding: 12px; color: var(--text-muted); }
.cover-fallback .cf-ico { font-size: 30px; }
.cover-fallback .cf-name { font-size: 12.5px; font-weight: 600; }
.cover-badge, .cover-topic, .cover-views {
  position: absolute; z-index: 2; font-size: 11px; line-height: 1.4; padding: 3px 8px; border-radius: var(--radius-pill);
  backdrop-filter: blur(8px); background: rgba(10,10,16,.55); border: 1px solid var(--border);
}
.cover-badge { left: 9px; top: 9px; color: var(--cyan); font-weight: 600; }
.cover-topic { left: 9px; bottom: 9px; color: #e8e8f5; }
.cover-views { right: 9px; bottom: 9px; color: #fff; }
[data-theme="light"] .cover-badge, [data-theme="light"] .cover-topic, [data-theme="light"] .cover-views { background: rgba(15,18,30,.62); color: #fff; }

.card-body { padding: 12px 14px 14px; }
.card-title { font-size: 15px; font-weight: 700; line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 11.5px; color: var(--text-faint); }
.foot-form { color: var(--accent-text); font-weight: 600; }

/* ----------------------------- 详情 ----------------------------- */
.detail-back { display: inline-flex; gap: 6px; font-size: 13.5px; color: var(--text-muted); margin-bottom: 18px; }
.detail-back:hover { color: var(--accent-text); }
.detail-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 30px; align-items: center; }
.detail-hero.hero-port { grid-template-columns: minmax(0, .72fr) minmax(0, 1fr); }
.hero-cover { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.hero-port .hero-cover { max-width: 340px; }
.hs-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.badge-form, .badge-topic {
  font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: var(--radius-pill);
  background: var(--tint, var(--accent-soft)); border: 1px solid var(--border); color: var(--text);
}
.badge-topic { background: var(--surface-2); color: var(--text-muted); }
.hs-tagline { margin-top: 10px; font-size: 15px; color: var(--text-muted); line-height: 1.7; }
.hero-side h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -.6px; line-height: 1.25; }
.hs-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hs-meta { display: flex; gap: 16px; margin-top: 18px; font-size: 12.5px; color: var(--text-faint); flex-wrap: wrap; }

.detail-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 34px; margin-top: 40px; align-items: start; }
.d-h3 { font-size: 15px; font-weight: 800; margin: 26px 0 12px; padding-left: 10px; border-left: 3px solid var(--violet); line-height: 1.2; }
.detail-main > .d-h3:first-child { margin-top: 0; }
.detail-intro { font-size: 15px; line-height: 1.9; color: var(--text); white-space: pre-wrap; word-break: break-word; }

.usage { display: flex; gap: 20px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.usage-steps { font-size: 13.5px; color: var(--text-muted); line-height: 1.9; padding-left: 18px; }
.usage-mini .usage-steps { flex: 1; }
.usage-url { font-size: 12.5px; color: var(--text-faint); word-break: break-all; margin-top: 10px; }
.qr-box { flex: none; text-align: center; }
.qr-box img { width: 148px; height: 148px; object-fit: contain; border-radius: 12px; background: #fff; padding: 6px; }
.qr-tip { font-size: 11.5px; color: var(--text-faint); margin-top: 6px; }
.inline-preview { margin-top: 14px; }
.inline-preview iframe { width: 100%; height: 68vh; min-height: 420px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.pv-bar { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-faint); margin-bottom: 8px; gap: 10px; }
.pv-bar a { color: var(--accent-text); }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.shot-grid img { border-radius: 12px; border: 1px solid var(--border); width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.prompt-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; color: var(--text-muted); max-height: 320px; overflow: auto; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.made-by { margin-top: 24px; font-size: 13px; color: var(--text-muted); padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.made-by b { color: var(--accent-text); }

.detail-side { position: sticky; top: calc(var(--nav-h) + 16px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.detail-side h4 { font-size: 13px; margin-bottom: 10px; color: var(--text-muted); font-weight: 700; letter-spacing: .5px; }
.side-stat { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.side-stat:last-of-type { border-bottom: none; }
.side-stat b { font-weight: 700; text-align: right; word-break: break-word; }
.d-side-actions { display: grid; gap: 8px; margin-top: 14px; }

/* 二维码灯箱 */
.lightbox { position: fixed; inset: 0; z-index: 200; background: #000; display: grid; place-items: center; padding: 24px; cursor: zoom-out; animation: fade .2s; }
.lb-inner { text-align: center; max-width: 92vw; }
.lb-inner img { max-width: min(78vw, 460px); max-height: 76vh; border-radius: 16px; background: #fff; padding: 10px; }
.lb-tip { color: #9a9aae; font-size: 13px; margin-top: 14px; }

/* ----------------------------- 投稿 ----------------------------- */
.submit-wrap { max-width: 820px; margin: 0 auto; }
.stepper { display: flex; align-items: center; gap: 8px; margin-bottom: 26px; }
.step { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-faint); white-space: nowrap; }
.step-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); }
.step.active { color: var(--accent-text); }
.step.active .step-num { background: linear-gradient(120deg, var(--violet), #7c6cf0); color: #0a0a0f; border-color: transparent; box-shadow: 0 4px 14px var(--glow); }
.step.done .step-num { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.step-line { flex: 1; height: 1px; background: var(--border); min-width: 12px; }
.submit-head { margin-bottom: 22px; }
.submit-head h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -.4px; }
.submit-head h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.submit-head p { color: var(--text-muted); font-size: 14px; margin-top: 6px; }

.form-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pick-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  padding: 18px; border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--border); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.pick-card:hover { transform: translateY(-3px); border-color: var(--violet); box-shadow: 0 14px 34px var(--glow); }
.pick-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.pk-ico { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; border-radius: 14px; background: var(--tint); border: 1px solid var(--border); margin-bottom: 8px; }
.pk-name { font-size: 17px; font-weight: 800; }
.pk-desc { font-size: 12.5px; color: var(--text-muted); }
.pk-req { font-size: 11.5px; color: var(--text-faint); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); width: 100%; }

.mine-box { display: block; margin-top: 24px; padding: 14px 16px; border: 1px dashed var(--border); border-radius: var(--radius); transition: border-color .2s, background .2s; }
.mine-box:hover { border-color: var(--violet); background: var(--surface-2); }
.mine-title { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.mine-sub { font-size: 12.5px; color: var(--accent-text); margin-top: 3px; }
.mine-hint { font-size: 12px; color: var(--text-faint); white-space: nowrap; }
.mine-foot { margin-top: 22px; }

.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow); }
.sec-title { font-size: 13px; font-weight: 800; color: var(--text-muted); letter-spacing: .3px; margin: 24px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.sec-title:first-child { margin-top: 0; }
.form-grid { display: grid; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.field .req { color: var(--pink); }
.field .hint { font-size: 11.5px; color: var(--text-faint); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; font-size: 14px; color: var(--text);
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field select { appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 12px) center;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.field select option { background: var(--bg-soft); color: var(--text); }
.field textarea { resize: vertical; min-height: 92px; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--violet); background: var(--surface-solid); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--pink); }
.field .err { font-size: 12px; color: var(--pink); display: none; }
.field.invalid .err { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; justify-content: space-between; margin-top: 26px; flex-wrap: wrap; }
.form-actions.end { justify-content: flex-end; }

/* 形态切换条：钉在表单顶部，滚动时也一直看得见 */
.form-switch {
  position: sticky; top: calc(var(--nav-h) + 10px); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 14px; padding: 7px 7px 7px 16px;
  background: rgba(12,12,18,.84);
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}
[data-theme="light"] .form-switch { background: rgba(255,255,255,.92); box-shadow: 0 6px 18px rgba(20,22,31,.08); }
.fs-cur { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-cur b { color: var(--text); font-weight: 700; }
.fs-emoji { font-size: 15px; line-height: 1; }
.fs-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 17px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 700; cursor: pointer;
  color: var(--accent-text); background: var(--accent-soft);
  border: 1px solid rgba(139,124,255,.38);
  transition: background .18s, color .18s, transform .18s var(--ease);
}
.fs-btn:hover { background: rgba(139,124,255,.24); color: var(--text); transform: translateY(-1px); }
.fs-btn:active { transform: translateY(0); }

.chips-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-chip { font-size: 13px; padding: 7px 15px; border-radius: var(--radius-pill); background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-muted); transition: all .18s; }
.pick-chip:hover { border-color: var(--violet); color: var(--text); }
.pick-chip.on { background: var(--accent-soft); border-color: var(--violet); color: var(--accent-text); font-weight: 700; }
.switch-line { flex-direction: row; align-items: center; gap: 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 13px; cursor: pointer; font-size: 13.5px; }
.switch-line input { width: 17px; height: 17px; accent-color: var(--violet); }

/* 上传器 */
.uploader { position: relative; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); overflow: hidden; cursor: pointer; background: var(--bg-soft); transition: border-color .2s, background .2s; }
.uploader:hover { border-color: var(--violet); }
.uploader.land { aspect-ratio: 16/9; }
.uploader.port { aspect-ratio: 3/4; max-width: 300px; }
.uploader.square { aspect-ratio: 1/1; max-width: 200px; }
.uploader img { width: 100%; height: 100%; object-fit: cover; }
.up-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--text-faint); font-size: 12.5px; text-align: center; padding: 10px; }
.up-plus { font-size: 26px; line-height: 1; }
.up-mask { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s; background: rgba(8,8,14,.55); }
.uploader:hover .up-mask { opacity: 1; }
.up-change { font-size: 12.5px; color: #fff; background: rgba(0,0,0,.5); padding: 6px 14px; border-radius: var(--radius-pill); }
.up-busy { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; background: rgba(8,8,14,.72); color: #fff; font-size: 12.5px; z-index: 3; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 预览 */
.preview-card { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.pv-cover .cover { border-radius: var(--radius); }
.pv-body h2 { font-size: 22px; font-weight: 800; margin-top: 10px; }
.pv-body > p { color: var(--text-muted); font-size: 14px; margin-top: 6px; }
.pv-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.pv-intro { font-size: 13.5px; color: var(--text-muted); line-height: 1.8; margin-top: 12px; white-space: pre-wrap; }
.pv-rows { margin-top: 16px; }
.pv-rows .side-stat { font-size: 12.5px; }
.submit-tip { font-size: 12px; color: var(--text-faint); text-align: center; margin-top: 16px; }

.success { text-align: center; padding: 46px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.ok-ico { font-size: 54px; filter: drop-shadow(0 0 20px var(--glow)); }
.success h2 { font-size: 24px; margin: 12px 0 8px; }
.success p { color: var(--text-muted); font-size: 14px; }
.success-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.success-link { margin-top: 20px; font-size: 12px; color: var(--text-faint); word-break: break-all; }

/* 管理 */
.admin-list { margin-top: 20px; display: grid; gap: 8px; }
.admin-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.admin-row img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; flex: none; }
.ar-main { min-width: 0; flex: 1; }
.ar-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.ar-st { font-size: 10.5px; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--text-faint); font-weight: 500; }
.ar-st.published { color: #4ade80; } .ar-st.hidden { color: #fbbf24; }
.ar-sub { font-size: 11.5px; color: var(--text-faint); }
.ar-ops { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ar-star { color: var(--accent-text); }
.mini-btn { font-size: 12px; padding: 5px 11px; border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }
.mini-btn:hover { border-color: var(--violet); color: var(--accent-text); }
.mini-btn.danger:hover { border-color: #f87171; color: #f87171; }
.mini-btn.primary { border-color: rgba(74, 222, 128, .45); color: #4ade80; }
.mini-btn.primary:hover { background: rgba(74, 222, 128, .12); border-color: #4ade80; }
.admin-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.admin-item .admin-row { border: 0; border-radius: 0; background: transparent; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.atab { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }
.atab b { font-size: 11px; font-weight: 700; padding: 0 5px; border-radius: 99px; background: var(--border); color: var(--text-faint); }
.atab.on { border-color: var(--violet); color: var(--accent-text); background: var(--accent-soft); }
.atab.on b { background: var(--violet); color: #fff; }
.ar-toggle { margin-top: 4px; font-size: 11.5px; color: var(--text-faint); background: none; border: 0; padding: 0; cursor: pointer; }
.ar-toggle:hover { color: var(--accent-text); }

/* 审核台分页条 */
.admin-pager { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 10px; }
.admin-pager .mini-btn { min-width: 86px; justify-content: center; text-align: center; }
.admin-pager .mini-btn[disabled] { opacity: .35; cursor: not-allowed; }
.admin-pager .mini-btn[disabled]:hover { border-color: var(--border); color: var(--text-muted); }
.admin-pager .ap-info { font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .admin-pager { gap: 8px; }
  .admin-pager .mini-btn { min-width: 0; padding: 5px 9px; }
  .admin-pager .ap-info { font-size: 12px; flex: 1 0 100%; order: -1; text-align: center; }
}
.ar-detail-wrap { border-top: 1px dashed var(--border); padding: 12px 14px 14px; }
.ar-detail { display: grid; gap: 8px; }
.ar-tagline { font-size: 13px; font-weight: 600; }
.ar-intro { font-size: 12.5px; color: var(--text-muted); line-height: 1.7; white-space: pre-wrap; }
.ar-kvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 18px; }
.ar-kv { display: flex; gap: 8px; font-size: 12px; min-width: 0; }
.ar-kv span { color: var(--text-faint); flex: none; min-width: 76px; }
.ar-kv b, .ar-kv a { font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-kv a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.ar-kv.wide { grid-column: 1 / -1; align-items: flex-start; }
.ar-qr { width: 110px; height: 110px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--border); }
.ar-meta { font-size: 11.5px; color: var(--text-faint); }
.ar-st.st-pending { color: #fbbf24; background: rgba(251, 191, 36, .12); }
.ar-st.st-published { color: #4ade80; background: rgba(74, 222, 128, .12); }
.ar-st.st-rejected { color: #f87171; background: rgba(248, 113, 113, .12); }
.ar-st.st-hidden { color: var(--text-faint); }
.empty .empty-ico { font-size: 46px; filter: drop-shadow(0 0 16px var(--glow)); }

/* ----------------------------- 页脚 / Toast ----------------------------- */
.footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 40px 20px 24px; display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer-brand { display: flex; gap: 12px; align-items: center; }
.footer-brand .brand-logo { font-size: 30px; }
.footer-title { font-weight: 800; font-size: 17px; }
.footer-sub { font-size: 13px; color: var(--text-muted); }
.footer-cols { display: flex; flex-wrap: wrap; gap: 48px; }
.footer-cols h4 { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; letter-spacing: .5px; }
.footer-cols a, .footer-cols span { display: block; font-size: 13.5px; color: var(--text); margin-bottom: 8px; }
.footer-cols a:hover { color: var(--accent-text); }
.footer-cols .muted { color: var(--text-muted); }
.footer-bottom { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 18px; font-size: 12.5px; color: var(--text-faint); border-top: 1px solid var(--border); }
.footer-bottom a { color: var(--text-faint); }
.footer-bottom a:hover { color: var(--accent-text); }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
  background: linear-gradient(120deg, var(--violet), #7c6cf0); color: #0a0a0f;
  padding: 12px 22px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 700; box-shadow: var(--shadow-hover), 0 6px 22px var(--glow); z-index: 300;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 右下角返回顶部 */
.to-top {
  position: fixed; right: 22px; bottom: 26px; z-index: 80;
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; cursor: pointer;
  color: var(--text); background: rgba(18,18,25,.86);
  border: 1px solid var(--border-strong);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  opacity: 0; transform: translateY(10px) scale(.9); pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease), border-color .2s, color .2s, box-shadow .2s;
}
[data-theme="light"] .to-top { background: rgba(255,255,255,.92); box-shadow: 0 6px 18px rgba(20,22,31,.12); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--accent-text); border-color: var(--violet); box-shadow: 0 10px 26px var(--glow); transform: translateY(-2px); }
.to-top:active { transform: translateY(0); }

/* ----------------------------- 响应式 ----------------------------- */
@media (max-width: 1080px) {
  .entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-inner.has-pick { grid-template-columns: minmax(0, 1fr) 290px; gap: 22px; }
  .masonry { columns: 2; }
  .detail-body { grid-template-columns: 1fr; }
  .detail-side { position: static; }
}
@media (max-width: 900px) {
  .hero-inner.has-pick { grid-template-columns: minmax(0, 1fr); }
  .hero-pick { display: none; }
}
@media (max-width: 860px) {
  .detail-hero, .detail-hero.hero-port { grid-template-columns: 1fr; }
  .hero-port .hero-cover { max-width: 260px; }
  .preview-card { grid-template-columns: 1fr; }
  .form-pick { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav { height: auto; }
  .nav-links { position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 16px 16px;
    background: color-mix(in srgb, var(--surface-solid) 96%, transparent); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-hover);
    transform: translateY(-130%); transition: transform .3s var(--ease); z-index: 90;
    visibility: hidden; }
  .nav-links.open { transform: none; visibility: visible; }
  .nav-links > a, .nav-drop > a { padding: 12px 14px; }
  .nav-drop-panel { position: static; display: grid !important; box-shadow: none; border: none; padding: 0 0 0 12px; background: none; min-width: 0; }
  .nav-drop .nav-drop-panel { display: none !important; }
  .nav-drop.open .nav-drop-panel { display: grid !important; }
  .nav-cta { text-align: center; justify-content: center; }
  .menu-btn { display: grid; place-items: center; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .nav-inner { flex-wrap: wrap; gap: 10px; padding: 10px 16px; height: auto; }
  .brand { margin-right: auto; }
  .app { padding: 20px 16px 48px; }
  .hero { padding-top: 8px; }
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-card { padding: 11px; gap: 9px; }
  .fc-ico { width: 34px; height: 34px; font-size: 17px; border-radius: 10px; }
  .fc-count { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .form-card { padding: 18px; }
  .footer-cols { gap: 28px; }
  .step-name { display: none; }
  .usage { flex-direction: column; }
  .to-top { right: 14px; bottom: 18px; width: 40px; height: 40px; }
}
@media (max-width: 560px) {
  .masonry { columns: 2; column-gap: 12px; }
  .masonry .card { margin-bottom: 12px; }
  .card-body { padding: 10px 11px 12px; }
  .card-title { font-size: 13.5px; }
  .card-desc { font-size: 11.5px; -webkit-line-clamp: 2; }
  .cover-topic { display: none; }
  .list-title { font-size: 21px; }
  .sec-title { margin-top: 20px; }
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .entry-card { padding: 9px 10px; gap: 8px; }
  .entry-card:last-child { grid-column: 1 / -1; }
  .hero-actions .btn { flex: 1; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; }
  .filter-line { align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, .orb, .brand-name, .hero h1 .hl { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ----------------------------- 法律 / 规则页 ----------------------------- */
.legal-wrap { max-width: 800px; margin: 0 auto; }
.legal-head { margin-bottom: 24px; }
.legal-back { font-size: 13px; color: var(--text-muted); }
.legal-back:hover { color: var(--accent-text); }
.legal-notice {
  margin-top: 14px; padding: 10px 13px; border-radius: var(--radius-sm);
  font-size: 12.5px; line-height: 1.65; color: var(--text-muted);
  background: var(--surface-2); border: 1px solid var(--border);
  border-left: 3px solid var(--violet);
}
.legal-head h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.6px; margin-top: 12px; }
.legal-head p { color: var(--text-muted); font-size: 14px; margin-top: 8px; line-height: 1.7; }
.legal-body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px 32px; box-shadow: var(--shadow); }
.legal-body .legal-lead { font-size: 14px; line-height: 1.85; color: var(--text); padding: 13px 16px; margin: 0 0 20px;
  background: var(--surface-2); border-left: 3px solid var(--violet); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.legal-body h2 { font-size: 15.5px; font-weight: 800; margin: 26px 0 10px; color: var(--text); letter-spacing: .2px; }
.legal-body h2:first-of-type { margin-top: 2px; }
.legal-body p { font-size: 13.8px; line-height: 1.9; color: var(--text-muted); margin: 9px 0; }
.legal-body ol, .legal-body ul { margin: 8px 0; padding-left: 22px; }
.legal-body li { font-size: 13.8px; line-height: 1.9; color: var(--text-muted); margin: 5px 0; }
.legal-body b { color: var(--text); font-weight: 700; }
.legal-body a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.legal-check li::marker { color: var(--accent-text); }
.legal-ban { list-style: none; padding-left: 0 !important; }
.legal-ban li { position: relative; padding-left: 20px; }
.legal-ban li::before { content: '✕'; position: absolute; left: 0; top: 0; color: var(--pink); font-weight: 700; font-size: 12px; }
.legal-note { font-size: 12.5px !important; color: var(--text-faint) !important; }
.legal-foot { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; font-size: 12.5px; color: var(--text-faint); }
.legal-foot a { color: var(--text-muted); }
.legal-foot a:hover { color: var(--accent-text); }

/* 投诉表单 */
.report-card { margin-top: 12px; padding: 20px 20px 6px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); }
.report-card .field-row { gap: 14px; }
.report-card .form-actions { margin-top: 4px; justify-content: flex-end; }
.report-done { text-align: center; padding: 26px 10px 30px; }
.rd-ico { font-size: 34px; }
.report-done h3 { font-size: 18px; font-weight: 800; margin: 10px 0 8px; }
.report-done p { font-size: 13.5px; line-height: 1.8; color: var(--text-muted); max-width: 460px; margin: 0 auto 16px; }

/* 投稿协议勾选 */
.agree-line { margin: 22px 0 2px; }
.agree-line .agree-box { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; font-weight: 400; line-height: 1.7; color: var(--text-muted); cursor: pointer; }
.agree-box input[type=checkbox] { width: 16px; height: 16px; flex: none; margin-top: 3px; accent-color: var(--violet); cursor: pointer; }
.agree-box a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.agree-line.invalid .agree-box { color: var(--pink); }

/* 页脚合规声明 */
.footer-declare { max-width: var(--maxw); margin: 0 auto; padding: 0 20px 20px; font-size: 12px; line-height: 1.85; color: var(--text-faint); }
.footer-declare a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 720px) {
  .legal-body { padding: 22px 18px; }
  .legal-head h1 { font-size: 23px; }
  .report-card { padding: 16px 14px 2px; }
  .report-card .field-row { grid-template-columns: 1fr; }
}

/* 审核台 · 侵权投诉面板 */
.arp-card { margin: 18px 0 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.arp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; font-size: 13px; font-weight: 800; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.arp-head b { color: var(--pink); }
.arp-head span { font-size: 11.5px; font-weight: 400; color: var(--text-faint); }
.arp-item { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.arp-item:last-child { border-bottom: 0; }
.arp-item.open { background: color-mix(in srgb, var(--pink) 6%, transparent); }
.arp-main { min-width: 0; flex: 1; }
.arp-t { font-size: 13.5px; font-weight: 700; word-break: break-all; }
.arp-type { display: inline-block; margin-right: 8px; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--pink); background: var(--surface-2); }
.arp-proof { font-size: 12.5px; color: var(--text-muted); line-height: 1.7; margin-top: 5px; white-space: pre-wrap; }
.arp-meta { font-size: 11.5px; color: var(--text-faint); margin-top: 6px; }
.arp-ops { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 720px) { .arp-item { flex-direction: column; } .arp-ops { justify-content: flex-start; width: 100%; } }

/* 详情页 · 侵权投诉入口 */
.d-report { display: block; margin-top: 12px; font-size: 12px; color: var(--text-faint); text-align: center; border-top: 1px dashed var(--border); padding-top: 12px; }
.d-report:hover { color: var(--accent-text); }
