/* ================================================================
   资源导航 · 样式表   （全新设计 · 流萤琉璃）
   浅色为默认，柔粉紫渐变 + 玻璃质感；右上角可切深色「夜樱」。
   全站零图片，只用渐变 / 圆角 / 阴影做质感。
   ================================================================ */

/* ---------- 1. 变量与主题 ---------- */
:root {
  --maxw: 900px;
  --ease: cubic-bezier(.22, .85, .26, 1);
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
          "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="light"] {
  --bg:       #fbf9ff;
  --bloom-1:  rgba(255, 150, 195, .55);
  --bloom-2:  rgba(150, 130, 255, .50);
  --bloom-3:  rgba(130, 205, 255, .45);
  --panel:    rgba(255, 255, 255, .80);
  --panel-2:  rgba(255, 255, 255, .55);
  --line:     rgba(124, 92, 255, .13);
  --line-2:   rgba(124, 92, 255, .24);
  --ink:      #1a1630;
  --ink-2:    #54506e;
  --ink-3:    #9a94b2;
  --accent:   #7c5cff;
  --accent-2: #ff5f9e;
  --hot:      #ff2f6d;
  --azure:    #2b6cf6;
  --violet:   #7c5cff;
  --shadow:   0 16px 40px -22px rgba(88, 58, 170, .38), 0 2px 10px -6px rgba(88, 58, 170, .16);
  --shadow-h: 0 26px 56px -24px rgba(88, 58, 170, .48), 0 4px 16px -8px rgba(88, 58, 170, .22);
  --glass:    saturate(160%) blur(14px);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg:       #0a0816;
  --bloom-1:  rgba(190, 60, 130, .40);
  --bloom-2:  rgba(110, 80, 255, .42);
  --bloom-3:  rgba(40, 130, 220, .34);
  --panel:    rgba(255, 255, 255, .052);
  --panel-2:  rgba(255, 255, 255, .032);
  --line:     rgba(255, 255, 255, .09);
  --line-2:   rgba(255, 255, 255, .17);
  --ink:      #f2effc;
  --ink-2:    #b8b2d2;
  --ink-3:    #7d7799;
  --accent:   #a48bff;
  --accent-2: #ff7cb2;
  --hot:      #ff5f8c;
  --azure:    #5b8cff;
  --violet:   #a48bff;
  --shadow:   0 18px 46px -24px rgba(0, 0, 0, .8), 0 2px 10px -6px rgba(0, 0, 0, .5);
  --shadow-h: 0 28px 62px -26px rgba(0, 0, 0, .9), 0 4px 18px -8px rgba(0, 0, 0, .6);
  --glass:    saturate(150%) blur(14px);
  color-scheme: dark;
}

/* ---------- 1b. 配色方案（后台「配色方案」可切换） ----------
   要加新配色：照抄一段改颜色，键名与 admin.js 下拉选项对应即可。 */

/* 樱粉（默认）——柔粉 + 蜜桃 */
html[data-palette="rose"] {
  --accent: #e2678c; --accent-2: #ef9a76; --hot: #d94f5c;
  --bloom-1: rgba(255, 168, 200, .55);
  --bloom-2: rgba(255, 196, 158, .45);
  --bloom-3: rgba(255, 226, 190, .42);
}
html[data-theme="dark"][data-palette="rose"] {
  --accent: #f38fae; --accent-2: #f5b58c; --hot: #ff7a86;
  --bloom-1: rgba(190, 60, 110, .36);
  --bloom-2: rgba(185, 115, 55, .30);
  --bloom-3: rgba(130, 65, 95, .28);
}

/* 青瓷 —— 青绿 + 天青 */
html[data-palette="teal"] {
  --accent: #2f9a8b; --accent-2: #4fa3d1; --hot: #d95f3f;
  --bloom-1: rgba(142, 226, 206, .52);
  --bloom-2: rgba(142, 192, 242, .46);
  --bloom-3: rgba(182, 236, 216, .42);
}
html[data-theme="dark"][data-palette="teal"] {
  --accent: #5fc9b6; --accent-2: #7cc0e8; --hot: #ff9a75;
  --bloom-1: rgba(40, 170, 150, .32);
  --bloom-2: rgba(50, 120, 200, .32);
  --bloom-3: rgba(40, 150, 140, .26);
}

/* 海盐 —— 澄蓝 + 浅青 */
html[data-palette="azure"] {
  --accent: #3a76d2; --accent-2: #59a7dd; --hot: #d95f3f;
  --bloom-1: rgba(152, 192, 255, .52);
  --bloom-2: rgba(152, 216, 242, .46);
  --bloom-3: rgba(192, 216, 255, .42);
}
html[data-theme="dark"][data-palette="azure"] {
  --accent: #74a6f0; --accent-2: #82c6ec; --hot: #ff9a75;
  --bloom-1: rgba(50, 100, 200, .32);
  --bloom-2: rgba(50, 140, 190, .30);
  --bloom-3: rgba(70, 110, 180, .26);
}

/* 暖阳 —— 琥珀 + 蜜金 */
html[data-palette="amber"] {
  --accent: #d9863a; --accent-2: #e5b352; --hot: #d4553f;
  --bloom-1: rgba(255, 216, 152, .54);
  --bloom-2: rgba(255, 192, 142, .46);
  --bloom-3: rgba(255, 236, 182, .42);
}
html[data-theme="dark"][data-palette="amber"] {
  --accent: #efa657; --accent-2: #f0cd7a; --hot: #ff8f70;
  --bloom-1: rgba(190, 120, 40, .32);
  --bloom-2: rgba(170, 100, 50, .28);
  --bloom-3: rgba(150, 110, 40, .24);
}

/* 雾紫 —— 淡化过的紫（比原来柔和很多） */
html[data-palette="violet"] {
  --accent: #7d6cd0; --accent-2: #a488d6; --hot: #d4566e;
  --bloom-1: rgba(196, 182, 255, .50);
  --bloom-2: rgba(212, 182, 246, .44);
  --bloom-3: rgba(182, 206, 255, .40);
}
html[data-theme="dark"][data-palette="violet"] {
  --accent: #a692e8; --accent-2: #c2a6ee; --hot: #f57f95;
  --bloom-1: rgba(110, 80, 200, .32);
  --bloom-2: rgba(120, 90, 190, .30);
  --bloom-3: rgba(80, 110, 200, .26);
}

/* 石墨 —— 中性灰蓝，最素 */
html[data-palette="slate"] {
  --accent: #5b6a85; --accent-2: #7d8ca6; --hot: #c9564f;
  --bloom-1: rgba(182, 196, 216, .50);
  --bloom-2: rgba(162, 182, 206, .44);
  --bloom-3: rgba(202, 212, 226, .42);
}
html[data-theme="dark"][data-palette="slate"] {
  --accent: #93a3bd; --accent-2: #aebbd0; --hot: #e58078;
  --bloom-1: rgba(80, 100, 140, .30);
  --bloom-2: rgba(90, 110, 150, .28);
  --bloom-3: rgba(70, 90, 130, .26);
}

/* ---------- 2. 基础 ---------- */
* { box-sizing: border-box; }

/* 关键：CSS 里给元素写了 display 会盖掉 hidden 属性，这里统一兜住 */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .4s ease, color .4s ease;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }

/* 背景光斑（纯 CSS，不用图片） */
.blooms {
  position: fixed;
  inset: -20vh -10vw;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.blooms i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .9;
  animation: drift 26s var(--ease) infinite alternate;
}
.blooms i:nth-child(1) { width: 46vw; height: 46vw; top: 2%;  left: -6%;  background: var(--bloom-1); }
.blooms i:nth-child(2) { width: 40vw; height: 40vw; top: 26%; right: -8%; background: var(--bloom-2); animation-duration: 32s; animation-delay: -6s; }
.blooms i:nth-child(3) { width: 38vw; height: 38vw; bottom: -6%; left: 30%; background: var(--bloom-3); animation-duration: 38s; animation-delay: -14s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4vw, 5vh, 0) scale(1.14); }
}

/* ---------- 3. 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .4px;
  font-size: 16px;
}
.brand .mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent);
}
.topbar .spacer { flex: 1; }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
  border: 1px solid var(--line);
  background: var(--panel-2);
  transition: all .22s var(--ease);
}
.icon-btn:hover { border-color: var(--line-2); transform: translateY(-1px); }
.icon-btn:active { transform: translateY(0) scale(.96); }

.link-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  transition: all .22s var(--ease);
}
.link-btn:hover { border-color: var(--line-2); transform: translateY(-1px); }

/* ---------- 4. 主体容器 ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
main { padding-bottom: 40px; }

/* ---------- 5. 公告区（取代原来的首屏大标题） ---------- */
.announce {
  position: relative;
  margin: 24px 0 30px;
  padding: 18px 20px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.announce::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.an-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
}
.an-ico {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}
.an-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .2px;
}
.an-date {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.an-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.an-list li {
  position: relative;
  padding-left: 17px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-2);
  word-break: break-word;
}
.an-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .74em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* ---------- 6. 分组 ---------- */
.groups { margin-top: 34px; }

.group { margin-bottom: 34px; }

.g-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line-2);
}
.g-no {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}
.g-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .2px;
}
.g-count {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.g-note {
  margin: 0 0 14px;
  padding: 12px 16px 12px 42px;
  position: relative;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-2);
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 30%, transparent);
  background: color-mix(in srgb, var(--accent-2) 9%, transparent);
}
.g-note::before {
  content: "!";
  position: absolute;
  left: 14px;
  top: 13px;
  width: 19px;
  height: 19px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(140deg, var(--accent-2), var(--accent));
}

/* ---------- 7. 资源条目 ---------- */
.items { display: flex; flex-direction: column; gap: 10px; }

.item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  box-shadow: var(--shadow);
  transition: transform .26s var(--ease), box-shadow .26s var(--ease), border-color .26s var(--ease);
  position: relative;
  overflow: hidden;
}
.item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity .26s var(--ease);
}
.item:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-h);
}
.item:hover::before { opacity: 1; }

.n-no {
  flex-shrink: 0;
  width: 30px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.n-main {
  /* 必须用 flex-basis:0，用 auto 时标题的 max-content 会把整行挤到换行去 */
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 9px;
}
.n-title {
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1.6;
  color: var(--ink);
  word-break: break-word;
  transition: color .2s ease;
}
.n-title.hot { color: var(--hot); }
.item:hover .n-title { color: var(--accent); }
.item:hover .n-title.hot { color: var(--hot); filter: brightness(1.06); }

/* 标题本身就是超链接：不加任何后缀箭头，只在悬停时给下划线反馈 */
.n-title[href]:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

/* 百度、夸克两个链接都有时，标题后面补两个小号文字标签做区分（不算按钮） */
.n-alt {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 2px;
}
.alt-lk {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  transition: all .2s var(--ease);
}
.alt-lk:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* 数据加载不出来时的提示 */
.empty-tip {
  padding: 28px 20px;
  text-align: center;
  font-size: 14px;
  line-height: 2;
  color: var(--ink-2);
  border-radius: var(--radius);
  border: 1px dashed var(--line-2);
  background: var(--panel);
}

/* ---------- 8. 提示条 / 页脚 ---------- */
.notice {
  margin: 34px 0 0;
  padding: 16px 20px 16px 48px;
  position: relative;
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
  border: 1px solid color-mix(in srgb, var(--accent-2) 32%, transparent);
  background: color-mix(in srgb, var(--accent-2) 8%, transparent);
}
.notice::before {
  content: "!";
  position: absolute;
  left: 16px; top: 17px;
  width: 21px; height: 21px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 900; color: #fff;
  background: linear-gradient(140deg, var(--accent-2), var(--accent));
}
.tips {
  margin-top: 14px;
  padding: 15px 20px;
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}

footer {
  margin-top: 40px;
  padding: 26px 20px 42px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
  border-top: 1px solid var(--line);
}
footer .f-links { margin-bottom: 8px; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
footer a:hover { color: var(--accent); }

/* ---------- 9. 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 50;
  width: 42px; height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 17px;
  color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--accent) 80%, transparent);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .3s var(--ease);
}
.to-top.on { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { filter: brightness(1.08); transform: translateY(-2px); }

/* ---------- 10. 草稿提示（仅编辑者本机可见） ---------- */
.draft-bar {
  max-width: var(--maxw);
  margin: 14px auto 0;
  padding: 11px 16px;
  border-radius: 13px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8a5a00;
  border: 1px solid #f0c46a;
  background: #fff6e2;
}
html[data-theme="dark"] .draft-bar { color: #ffd489; border-color: #6b5324; background: #2b2413; }
.draft-bar b { font-weight: 800; }
.draft-bar .spacer { flex: 1; }
.draft-bar button {
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid currentColor;
  opacity: .85;
}

/* ---------- 11. 轻提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 99;
  transform: translate(-50%, 20px);
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(26, 20, 48, .93);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
  opacity: 0;
  visibility: hidden;
  transition: all .3s var(--ease);
  max-width: 84vw;
  text-align: center;
}
.toast.on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- 12. 进场动画 ---------- */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }

/* ---------- 13. 后台页面 ---------- */
body.admin { background: var(--bg); }
.admin-top {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.admin-top .wrap { padding: 12px 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-top .title { font-weight: 800; font-size: 16px; margin-right: 4px; }

.mode-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  white-space: nowrap;
}
.mode-badge.on {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #34c77b, #1f9e5c);
}
.mode-badge.off {
  color: #9a6a00;
  border-color: #f0c46a;
  background: #fff6e2;
}
html[data-theme="dark"] .mode-badge.off { color: #ffd489; border-color: #6b5324; background: #2b2413; }

.btn {
  height: 36px;
  padding: 0 15px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  transition: all .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { border-color: var(--line-2); transform: translateY(-1px); }
.btn.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 75%, transparent);
}
.btn.danger { color: var(--hot); border-color: color-mix(in srgb, var(--hot) 35%, transparent); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }

.admin-body { max-width: 960px; margin: 0 auto; padding: 24px 20px 80px; }

.card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
}
.card > h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
}
.card > .hint { margin: 0 0 16px; font-size: 12.5px; color: var(--ink-3); }

.fld { margin-bottom: 13px; }
.fld > label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.fld input[type="text"],
.fld textarea,
.fld select {
  width: 100%;
  padding: 10px 13px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.fld select { cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.fld select option { background: #fff; color: #1a1630; }
html[data-theme="dark"] .fld select option { background: #14112a; color: #f2effc; }
.fld input:focus, .fld textarea:focus, .fld select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }

.gcard { border: 1px solid var(--line-2); border-radius: 15px; padding: 15px; margin-bottom: 14px; background: var(--panel-2); }
.gcard-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.gcard-head .g-no { box-shadow: none; }
.gcard-head .spacer { flex: 1; }

.icard {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
  margin-bottom: 10px;
  background: var(--panel);
}
.icard-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.icard-head .spacer { flex: 1; }
.lk-row { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 9px; align-items: center; margin-bottom: 8px; }
.lk-row .tag-lk {
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  padding: 8px 0;
  border-radius: 9px;
  color: #fff;
}
.tag-lk.b { background: linear-gradient(135deg, #5a92ff, #2f6bf0); }
.tag-lk.q { background: linear-gradient(135deg, #35c3c9, #0e9fb8); }
.lk-row input {
  width: 100%;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--ink);
  font-size: 12.5px;
  outline: none;
}
.lk-row input:focus { border-color: var(--accent); }

.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.chk input { width: 15px; height: 15px; accent-color: var(--accent); }

.save-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.save-bar .dot-save { width: 8px; height: 8px; border-radius: 50%; background: #38c172; }
.save-bar .spacer { flex: 1; }

/* 密码门 */
.gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--bg);
}
.gate .box {
  width: 100%;
  max-width: 330px;
  padding: 26px 24px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}
.gate h3 { margin: 0 0 6px; font-size: 17px; }
.gate p { margin: 0 0 16px; font-size: 12.5px; color: var(--ink-3); }
.gate input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--ink);
  text-align: center;
  font-size: 14px;
  outline: none;
  margin-bottom: 12px;
}
.gate input:focus { border-color: var(--accent); }
.gate .err { color: var(--hot); font-size: 12.5px; min-height: 18px; margin-bottom: 6px; }

/* ---------- 14. 响应式 ---------- */
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 15px; }

  .announce { margin: 18px 0 24px; padding: 16px 16px 17px; }
  .an-title { font-size: 15px; }
  .an-list li { font-size: 13.5px; }

  .g-head { gap: 10px; }
  .g-no { width: 30px; height: 30px; border-radius: 10px; font-size: 12px; }
  .g-name { font-size: 16.5px; }

  /* 关键：序号与标题始终同一行；标题换行时序号与「第一行」齐平，只有按钮换行铺满 */
  .item { flex-wrap: wrap; align-items: flex-start; padding: 14px 15px; gap: 6px 10px; }
  .n-no { width: 22px; font-size: 11.5px; line-height: 1.62; }
  .n-main { flex: 1 1 0; }
  .n-title { font-size: 15px; }
  .n-alt { margin-left: 0; }

  .notice, .tips { padding-left: 18px; padding-right: 16px; font-size: 13px; }
  .notice { padding-left: 46px; }
  .g-note { padding-left: 42px; font-size: 13px; }

  .to-top { right: 14px; bottom: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .lk-row { grid-template-columns: 66px minmax(0, 1fr); }
  .save-bar { padding: 9px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
