:root {
  /* 浅蓝 · 阳光 · 官方调性 */
  --bg: #eef7ff;
  --bg-soft: #f7fcff;
  --surface: #ffffff;
  --surface-2: #e6f3ff;
  --ink: #102d44;
  --ink-soft: #26485f;
  --muted: #587187;
  --line: #d5e7f4;
  --line-strong: #b9d9ee;
  --primary: #1b74b7;
  --primary-deep: #14649c;
  --sky: #6fb8ea;
  --sun: #ff9d3d;
  --sun-soft: #ffe8cf;
  --mint: #1b74b7;
  --mint-soft: rgba(27, 116, 183, 0.12);
  --lime: #f0932b;
  --lime-soft: rgba(255, 157, 61, 0.16);
  --coral: #c04a32;
  --coral-soft: rgba(192, 74, 50, 0.12);
  --grad: linear-gradient(118deg, #2d95d8 0%, #74c4ef 62%, #ffc078 100%);
  --grad-soft: linear-gradient(180deg, rgba(111, 184, 234, 0.18), rgba(255, 208, 150, 0.12));
  --shadow: 0 14px 34px -18px rgba(18, 68, 108, 0.38);
  --shadow-soft: 0 8px 22px -16px rgba(18, 68, 108, 0.3);
  --radius: 20px;
  --radius-sm: 14px;
  --maxw: 1180px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; color: inherit; }
svg { display: block; }
.ico { width: 20px; height: 20px; }

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(720px 420px at 12% -8%, rgba(126, 198, 238, 0.5), transparent 65%),
    radial-gradient(640px 400px at 92% 0%, rgba(255, 196, 120, 0.32), transparent 62%),
    linear-gradient(180deg, #e9f5ff 0%, #f6fbff 46%, #eef7ff 100%);
}

.app {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px 92px;
}

/* ---------------- 顶栏 ---------------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  transition: background-color 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
  will-change: backdrop-filter;
}

/* 顶端与页面背景融合，无边界；向下滚动才出现层次 */
.appbar.is-scrolled {
  background: rgba(238, 247, 255, 0.84);
  backdrop-filter: blur(14px) saturate(1.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.12);
  box-shadow: 0 1px 0 var(--line), 0 12px 24px -26px rgba(18, 68, 108, 0.55);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 4px 14px -6px rgba(31, 127, 196, 0.6);
  flex: none;
}

.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.18; }
.brand-text b { font-size: 19px; letter-spacing: 0.06em; }
.brand-text small {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appbar-actions { display: flex; align-items: center; gap: 10px; }
.hello { font-size: 12px; color: var(--muted); max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  box-shadow: var(--shadow-soft);
}
.icon-btn .ico, .icon-btn svg { width: 20px; height: 20px; }
.icon-btn:active { transform: scale(0.95); }

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--coral);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  border: 2px solid var(--bg);
}

/* ---------------- 视图 ---------------- */
.main { display: block; }
.view { display: none; animation: viewIn 0.28s ease both; }
.view.is-active { display: block; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------------- 搜索 ---------------- */
.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  color: var(--muted);
}
.searchbar .ico { flex: none; width: 18px; height: 18px; }
.searchbar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
}
.searchbar input::placeholder { color: #8ba6ba; }
.searchbar input::-webkit-search-cancel-button { display: none; }
.clear-btn {
  border: 0;
  background: var(--surface-2);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.clear-btn svg { width: 14px; height: 14px; }

/* ---------------- 主视觉 ---------------- */
/* 主视觉按原图 3:2 展示，完整不裁切、不拉伸 */
.hero {
  position: relative;
  margin-top: 14px;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  isolation: isolate;
  background: var(--surface-2);
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* 贝塞尔曲线装饰：白 + 蓝互补填充，底部融入，不遮挡内容 */
.hero-curves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 44%;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 -8px 14px rgba(20, 70, 110, 0.14));
  animation: curveFloat 10s ease-in-out infinite alternate;
}
.hero-curves .curve-line { opacity: 0.55; }
@keyframes curveFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-curves { animation: none; }
}

/* ---------------- 公告条（喇叭 + 走马灯） ---------------- */
.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #cfe6f7;
  border-radius: var(--radius-sm);
  background: linear-gradient(96deg, #eaf6ff, #fdf8f0);
  text-align: left;
  color: var(--ink-soft);
  overflow: hidden;
}
.notice-ico {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
}
.notice-ico svg { width: 17px; height: 17px; }
.notice-viewport { flex: 1; min-width: 0; overflow: hidden; }
.notice-track {
  display: inline-flex;
  gap: 40px;
  white-space: nowrap;
  font-size: 12.5px;
  animation: noticeScroll 24s linear infinite;
  will-change: transform;
}
.notice-track span { padding-right: 40px; }
.notice-more {
  flex: none;
  font-size: 11px;
  color: var(--primary-deep);
  background: rgba(31, 127, 196, 0.1);
  border-radius: 999px;
  padding: 3px 8px;
}
@keyframes noticeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .notice-track { animation: none; }
  .notice-viewport { overflow-x: auto; }
}

/* ---------------- 纯图片装饰 ---------------- */
.promo {
  display: block;
  margin-top: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface-2);
}
.promo img { display: block; width: 100%; height: auto; }

.wave-sep { width: 100%; height: 22px; opacity: 0.9; }

/* ---------------- 三个入口 ---------------- */
.entries { display: grid; gap: 10px; margin: 8px 0 6px; }
.entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.entry:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.entry-ico {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex: none;
}
.entry-ico svg { width: 21px; height: 21px; }
.entry-ico-mint { background: var(--mint-soft); color: var(--primary); }
.entry-ico-lime { background: var(--lime-soft); color: #b9680d; }
.entry-ico-coral { background: var(--coral-soft); color: var(--coral); }
.entry-title { flex: 1; display: flex; flex-direction: column; font-weight: 700; font-size: 14.5px; }
.entry-title small { font-weight: 400; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.entry-arrow { color: #9fb8ca; width: 18px; height: 18px; }

/* ---------------- 教程区 ---------------- */
.tutorials { margin-top: 22px; }
.tutorial-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.tutorial-head h2 { margin: 0; font-size: 20px; letter-spacing: 0.02em; }
.tutorial-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.tabs {
  display: flex;
  gap: 6px;
  margin: 14px 0 10px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  width: fit-content;
}
.tab-btn {
  border: 0;
  background: transparent;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.tab-btn.is-on { background: var(--surface); color: var(--primary-deep); box-shadow: 0 4px 12px -8px rgba(18, 68, 108, 0.5); }

.tutorial-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
}
.chip.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.sort-select {
  flex: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--ink-soft);
}

.rec-list { display: grid; gap: 9px; }
.rec {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease;
}
.rec:hover { transform: translateY(-2px); }
.rec-num {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-deep);
  background: linear-gradient(150deg, #e3f3ff, #fff3e2);
}
.rec-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rec-titlerow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rec-titlerow b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-main small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-meta { color: #7c94a7; font-size: 11px; }
.rec-arrow { width: 16px; height: 16px; color: #9fb8ca; flex: none; }

.tag {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--primary-deep);
}
.tag-official { background: rgba(31, 127, 196, 0.14); color: var(--primary-deep); }
.tag-contrib { background: rgba(255, 157, 61, 0.18); color: #a35f0b; }
.tag-pending, .tag-wait { background: rgba(255, 157, 61, 0.18); color: #a35f0b; }
.tag-approved, .tag-ok, .tag-published { background: rgba(31, 150, 110, 0.14); color: #147a59; }
.tag-rejected, .tag-muted { background: rgba(120, 140, 155, 0.14); color: #5d7486; }
.tag-default { background: var(--surface-2); color: var(--primary-deep); }

.skeleton-row {
  height: 76px;
  border-radius: var(--radius);
  background: linear-gradient(100deg, #eaf4fc 20%, #f7fbff 40%, #eaf4fc 60%);
  background-size: 220% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* ---------------- 分页 ---------------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 14px 0 6px; }
.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12.5px;
}
.page-btn.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: 0.45; cursor: default; }
.page-gap { align-self: center; color: var(--muted); }

/* ---------------- 页头 ---------------- */
.page-head { padding: 18px 4px 10px; }
.page-head.compact { padding-bottom: 4px; }
.page-head h1 { margin: 6px 0 4px; font-size: 25px; letter-spacing: 0.01em; }
.page-head p { margin: 0; color: var(--muted); font-size: 12.5px; }
.page-head .kicker { color: var(--primary); }
.back-link {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 0 0 2px; padding: 0; border: 0; background: transparent;
  color: var(--ink-soft); font: inherit; font-size: 12px; cursor: pointer;
  transition: color .18s ease;
}
.back-link:hover { color: var(--primary); }
.back-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* ---------------- 卡片 / 表单 ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 12px;
}
.card h3 { margin: 0 0 10px; font-size: 15px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-head h3 { margin: 0; }
.card-head .count { font-size: 11px; color: var(--muted); }

.form { display: grid; gap: 12px; }
.form-title {
  font-weight: 700;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.form-title em { font-style: normal; font-weight: 400; font-size: 11px; color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12px; color: var(--ink-soft); font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.field > span em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 10.5px; }
.field > span em:first-of-type { color: #a8631a; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  padding: 11px 12px;
  font-size: 14px;
  outline: 0;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.field input[type="file"] { padding: 9px 10px; font-size: 12px; color: var(--muted); background: var(--surface); }
.field textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 127, 196, 0.14);
  background: #fff;
}
.field input::placeholder, .field textarea::placeholder { color: #8ba6ba; }

.inline-field { display: flex; gap: 8px; }
.inline-field input { flex: 1; min-width: 0; }
.inline-field .btn { flex: none; padding-left: 14px; padding-right: 14px; }

.form-hint { margin: 0; font-size: 11.5px; color: var(--muted); }
.form-hint a { color: var(--primary-deep); text-decoration: underline; text-underline-offset: 2px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 18px;
  font-size: 13.5px;
  font-weight: 700;
  transition: transform 0.14s ease, filter 0.14s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-block { width: 100%; }
.btn.small { padding: 8px 13px; font-size: 12px; border-radius: 10px; }
.btn-solid { background: linear-gradient(112deg, var(--primary) 0%, #3fa0dd 70%, #ffb061 160%); color: #fff; box-shadow: 0 10px 22px -14px rgba(31, 127, 196, 0.75); }
.btn-mint { background: var(--primary); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--primary-deep); }

.text-link { color: var(--primary-deep); text-decoration: underline; text-underline-offset: 2px; }
.link-btn { border: 0; background: transparent; color: var(--primary-deep); font-size: 12px; font-weight: 700; padding: 2px 0; }

/* ---------------- 入驻流程 ---------------- */
.note-card {
  background: var(--grad-soft);
  border: 1px solid #cfe6f7;
  border-radius: var(--radius);
  padding: 15px 16px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.note-card b { display: block; margin-bottom: 6px; font-size: 13.5px; }
.note-card ol { margin: 0; padding-left: 18px; line-height: 1.8; }
.note-card p { margin: 8px 0 0; color: var(--muted); }

.grant-summary {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--primary-deep);
  font-size: 12.5px;
  font-weight: 600;
}

.check-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }
.check-row .hint { font-size: 11px; color: var(--muted); }

/* ---------------- 我的 ---------------- */
.profile { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 19px;
  color: #fff;
  background: var(--grad);
  flex: none;
}
.profile-main { flex: 1; min-width: 0; }
.profile-main h2 { margin: 0; font-size: 18px; }
.profile-main p { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.stat b { display: block; font-size: 20px; color: var(--primary-deep); line-height: 1.2; }
.stat span { font-size: 10.5px; color: var(--muted); }

.list { display: grid; gap: 2px; }
.list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: 0; }
.list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-main b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-main small { color: var(--muted); font-size: 11px; }
.list-link { flex: none; font-size: 11px; color: var(--primary); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.list-link:hover { border-color: var(--primary); }
.empty-row { padding: 14px 2px; color: var(--muted); font-size: 12px; text-align: center; }
.admin-link { margin-top: 4px; }

/* ---------------- 搜索空态 ---------------- */
.empty {
  padding: 26px 16px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  display: grid;
  gap: 6px;
  justify-items: center;
}
.empty b { color: var(--ink); font-size: 14px; }
.empty p { margin: 0; font-size: 12px; }
.empty .btn { margin-top: 6px; }

/* ---------------- 联系 ---------------- */
.contact-cards { display: grid; gap: 10px; margin-bottom: 12px; }
.contact-cards-v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contact { display: flex; align-items: center; gap: 12px; }
.contact-link {
  min-height: 96px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.contact-link:hover { border-color: #b9dcf3; box-shadow: 0 14px 26px -22px rgba(18, 68, 108, 0.45); transform: translateY(-1px); }
.contact-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.contact-link p { font-size: 16px; font-weight: 600; letter-spacing: 0.01em; }
.contact-action { font-size: 12px; color: var(--primary); }
.contact-static { opacity: 0.92; }
.contact-static p { font-size: 16px; font-weight: 600; }
.contact-note { font-size: 12px; color: var(--muted); }
@media (max-width: 620px) { .contact-cards-v2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .contact-link { transition: none; } }
.contact-ico {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--mint-soft);
  color: var(--primary);
  flex: none;
}
.contact-ico svg { width: 20px; height: 20px; }
.contact h3 { margin: 0 0 2px; font-size: 13px; }
.contact p { margin: 0; font-size: 13px; color: var(--primary-deep); font-weight: 600; }

.channel-list { display: grid; gap: 8px; }
.channel {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.channel b { font-size: 13px; color: var(--primary-deep); }
.channel span { font-size: 11.5px; color: var(--muted); }

/* ---------------- 底部导航 ---------------- */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 26;
  width: calc(100% - 32px);
  max-width: 420px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 16px 34px -18px rgba(18, 68, 108, 0.4);
  backdrop-filter: blur(14px);
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 0 6px;
  border-radius: 14px;
  color: #7b93a6;
  font-size: 10.5px;
  font-weight: 600;
}
.tab svg { width: 20px; height: 20px; }
.tab.is-on { color: var(--primary-deep); background: var(--surface-2); }

/* ---------------- 抽屉 ---------------- */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 40, 62, 0.44);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.sheet.is-open .sheet-backdrop { opacity: 1; }
.sheet-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  overflow: auto;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 8px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -18px 40px -22px rgba(12, 40, 62, 0.6);
  transform: translateY(100%);
  transition: transform 0.24s cubic-bezier(0.22, 0.8, 0.28, 1);
}
.sheet.is-open .sheet-panel { transform: translateY(0); }
.sheet-grab { width: 38px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 2px auto 6px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 10px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.sheet-head h2 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.sheet-ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; }
.sheet-ico svg { width: 17px; height: 17px; }
.sheet-ico-bell { background: var(--mint-soft); color: var(--primary-deep); }
.sheet-ico-mega { background: var(--sun-soft); color: #a8631a; }

.sheet-list { gap: 0; }
.notice-item { display: flex; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.notice-item:last-child { border-bottom: 0; }
.notice-dot { width: 7px; height: 7px; border-radius: 50%; background: transparent; margin-top: 7px; flex: none; }
.notice-item.unread .notice-dot { background: var(--coral); }
.notice-body { min-width: 0; }
.notice-title { font-size: 13.5px; font-weight: 700; }
.notice-body p { margin: 3px 0; font-size: 12px; color: var(--muted); line-height: 1.55; }
.notice-body small { color: #8ba6ba; font-size: 10.5px; }
.sheet-foot { padding-top: 12px; text-align: center; }

.announce-item { padding: 13px 2px; border-bottom: 1px solid var(--line); }
.announce-item:last-child { border-bottom: 0; }
.announce-title { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.announce-title .pin { font-size: 10px; font-weight: 700; color: #a8631a; background: var(--sun-soft); border-radius: 5px; padding: 1px 5px; }
.announce-item p { margin: 5px 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.announce-item small { color: #8ba6ba; font-size: 10.5px; }

.tutorial-detail h2 { margin: 6px 0; font-size: 20px; line-height: 1.35; }
.detail-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-sub { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.detail-by { font-size: 11.5px; color: #7c94a7; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.detail-body { font-size: 14px; line-height: 1.9; padding: 12px 0; color: var(--ink-soft); }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 10px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translate(-50%, 12px);
  z-index: 60;
  max-width: min(86vw, 420px);
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(16, 45, 68, 0.92);
  color: #f2f9ff;
  font-size: 12.5px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 平板 / 电脑 ---------------- */
@media (min-width: 720px) {
  .app { padding: 0 24px 104px; }
  .appbar { padding: 16px 2px; }
  .brand-avatar { width: 44px; height: 44px; }
  .brand-text b { font-size: 21px; }
  .brand-text small { font-size: 11.5px; }
  .hero { max-width: 980px; margin-left: auto; margin-right: auto; }
  .entries { grid-template-columns: repeat(3, 1fr); }
  .entry { flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; min-height: 150px; }
  .entry-arrow { display: none; }
  .rec-list { grid-template-columns: 1fr 1fr; }
  .contact-cards { grid-template-columns: repeat(3, 1fr); }
  .searchbar { max-width: 560px; }
  .page-head h1 { font-size: 32px; }
  .sheet { align-items: center; }
  .sheet-panel {
    border-radius: 24px;
    max-height: 82vh;
    padding: 12px 26px 24px;
    transform: translateY(18px) scale(0.98);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .sheet.is-open .sheet-panel { transform: none; opacity: 1; }
  .sheet-grab { display: none; }
  .toast { bottom: 104px; }
  .tutorials { margin-top: 30px; }
}

@media (min-width: 1024px) {
  .home-grid { display: block; }
  .promo img { width: 100%; height: auto; object-fit: contain; }
  .tabbar { max-width: 460px; }
}

@media (max-width: 380px) {
  .brand-text small { display: none; }
  .stat-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- 实时搜索下拉 ---------------- */
.search-wrap { position: relative; }
.search-pop {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 6px;
  max-height: 62vh;
  overflow: auto;
}
.search-pop[hidden] { display: none; }
.search-pop-list { display: grid; }
.search-pop-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px;
  border-radius: 10px;
  text-align: left;
  color: var(--ink);
}
.search-pop-row:hover { background: var(--surface-2); }
.sp-cat {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-deep);
  background: linear-gradient(150deg, #e3f3ff, var(--sun-soft));
}
.sp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sp-main b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-main small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-diff { flex: none; font-size: 10px; color: var(--primary-deep); background: var(--surface-2); border-radius: 5px; padding: 2px 6px; }
.search-pop-loading, .search-pop-empty { padding: 14px 10px; color: var(--muted); font-size: 12px; text-align: center; }
.search-pop-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 4px; border-top: 1px solid var(--line); margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.search-pop-foot[hidden] { display: none; }

/* ---------------- 教程封面卡片 ---------------- */
#tutorialList { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { #tutorialList { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { #tutorialList { grid-template-columns: repeat(3, 1fr); } }

.tut-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow: visible;
}
.tut-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tut-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.tut-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 17px 17px 0 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2d95d8 0%, #74c4ef 58%, #ffc078 100%);
}
.tut-card:nth-child(3n+2) .tut-cover { background: linear-gradient(135deg, #1b74b7, #79d0e6 60%, #bfe8ff); }
.tut-card:nth-child(3n+3) .tut-cover { background: linear-gradient(135deg, #3a8ec4, #a5d8f0 55%, #ffe0b8); }
.tut-cover-img { width: 100%; height: 100%; object-fit: cover; }
.tut-cover-letter { font-size: 46px; font-weight: 800; color: rgba(255, 255, 255, 0.94); text-shadow: 0 4px 18px rgba(10, 45, 70, 0.35); }
.tut-diff {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(22, 121, 88, 0.92);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px -6px rgba(6, 50, 36, 0.6);
}
.tut-more {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(9, 38, 58, 0.46);
  color: #fff;
  backdrop-filter: blur(4px);
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.tut-more:hover { background: rgba(9, 38, 58, 0.68); }
.tut-more:active { transform: scale(0.94); }
.tut-more svg { width: 17px; height: 17px; }
.tut-menu {
  position: absolute;
  right: 10px;
  top: 46px;
  z-index: 8;
  min-width: 158px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 2px;
}
.tut-menu[hidden] { display: none; }
.tut-act {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  padding: 8px 9px;
  border-radius: 9px;
  font-size: 12px;
  color: var(--ink-soft);
  text-align: left;
}
.tut-act:hover { background: var(--surface-2); }
.tut-act.is-on { color: var(--primary); font-weight: 700; }
.tut-act svg { width: 16px; height: 16px; }
.tut-act b { margin-left: auto; font-size: 12px; }
.tut-view { display: flex; align-items: center; gap: 6px; padding: 7px 9px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 2px; }
.tut-view svg { width: 15px; height: 15px; }
.tut-view b { color: var(--ink-soft); }
.tut-body { padding: 11px 12px 13px; display: grid; gap: 4px; }
.tut-title-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tut-title-row b { font-size: 14px; line-height: 1.35; flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tut-body small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tut-meta { color: #7c94a7; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 详情里的点赞收藏 */
.detail-react { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.detail-react .tut-act { padding: 6px 8px; }
.detail-react .tut-view { border-top: 0; margin-left: auto; padding: 0; }

/* ---------------- 设计语言：贝塞尔曲线装饰（界面层，不覆盖主视觉） ---------------- */
.deco-curves {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
.hero { position: relative; }
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(238, 247, 255, 0), rgba(238, 247, 255, .55));
  pointer-events: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.tutorials { position: relative; }
.tutorials::before {
  content: "";
  position: absolute;
  right: -6%;
  top: -26px;
  width: 210px;
  height: 120px;
  border-radius: 0 0 0 100%;
  background: radial-gradient(120% 120% at 100% 0, rgba(75, 159, 216, .16), rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}
.tutorial-head h2 { position: relative; padding-left: 14px; }
.tutorial-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 22px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: linear-gradient(180deg, var(--sky), var(--primary));
}

/* ---------------- 教程筛选：两块板各两组，避免维度叠加 ---------------- */
.filters { display: grid; gap: 8px; margin: 10px 0 4px; }
.filter-row { display: flex; align-items: center; gap: 10px; }
.filter-label { flex: 0 0 34px; font-size: 11.5px; color: var(--muted); }
.filter-row .chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filter-row .chips::-webkit-scrollbar { display: none; }
.filter-row .chip { flex: 0 0 auto; }
.tutorial-sort { display: flex; justify-content: flex-end; margin: 2px 0 6px; }

/* 官方教程封面：设计化文字封面（地图类型），不依赖外部图片 */
.tut-cover-letter.is-map {
  background: linear-gradient(140deg, #dff1ff 0%, #b7ddf4 46%, #ffffff 100%);
  color: #14649c;
  font-size: 15px;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 10px;
}
.detail-facts { display: grid; gap: 10px; margin: 12px 0; }
.detail-fact { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.detail-fact > span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.detail-fact p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); }

@media (max-width: 640px) {
  .filter-label { flex-basis: 30px; }
  .filters { margin-top: 8px; }
}
.tag-diff { background: rgba(31, 150, 110, 0.14); color: #147a59; }

/* ---------------- Tab 图标动效 ---------------- */
.tab svg { transition: transform 0.18s ease; }
.tab:active svg { transform: scale(0.9); }
.tab.is-on svg { animation: tabIconPop 0.3s cubic-bezier(0.24, 0.9, 0.3, 1.2); }
@keyframes tabIconPop {
  0% { transform: translateY(1px) scale(0.94); }
  55% { transform: translateY(-2px) scale(1.08); }
  100% { transform: translateY(0) scale(1); }
}
.tab-btn { transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }

/* ---------------- 我的：设置 / 作者资料 ---------------- */
button.list-row { border: 0; background: transparent; width: 100%; text-align: left; color: inherit; cursor: pointer; }
.history-row { border-bottom: 1px solid var(--line); }
.history-row:hover .list-main b { color: var(--primary); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.setting-row span { min-width: 0; }
.setting-row b { font-size: 13px; }
.setting-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.theme-switch { flex: none; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.theme-switch button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-size: 12px; color: var(--muted); font-weight: 600; }
.theme-switch button.is-on { background: var(--surface); color: var(--primary-deep); box-shadow: 0 4px 10px -8px rgba(18, 68, 108, 0.6); }
.author-badge-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.author-intro { padding: 11px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; line-height: 1.65; word-break: break-word; }
#authorCssPreview { white-space: pre-wrap; font-size: 11px; color: var(--muted); background: var(--surface-2); padding: 8px; border-radius: 8px; overflow: auto; max-height: 120px; margin: 0; }
#authorCssBox { margin-top: 8px; }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.guest-card b { font-size: 14px; }
.guest-card p { color: var(--muted); font-size: 12px; margin: 6px 0 12px; }

/* ---------------- 深色主题 ---------------- */
[data-theme="dark"] {
  --bg: #0b1925;
  --bg-soft: #102434;
  --surface: #142c3e;
  --surface-2: #1a3a50;
  --ink: #e9f5ff;
  --ink-soft: #c2dbea;
  --muted: #93afc2;
  --line: #24435b;
  --line-strong: #335f7e;
  --primary: #2a8fcd;
  --primary-deep: #8fd3f7;
  --mint: #2a8fcd;
  --mint-soft: rgba(116, 196, 239, 0.16);
  --sun-soft: rgba(255, 157, 61, 0.18);
  --shadow: 0 16px 34px -20px rgba(0, 0, 0, 0.7);
  --shadow-soft: 0 8px 22px -16px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}
[data-theme="dark"] .appbar { background: transparent; }
[data-theme="dark"] .appbar.is-scrolled { background: rgba(11, 25, 37, 0.86); }
[data-theme="dark"] .searchbar input::placeholder { color: #7d99ab; }
[data-theme="dark"] .tut-cover-letter { color: rgba(255, 255, 255, 0.92); }
[data-theme="dark"] .tag-official { background: rgba(116, 196, 239, 0.18); color: #a9dcf7; }
[data-theme="dark"] .tag-contrib { background: rgba(255, 157, 61, 0.2); color: #ffc07a; }
[data-theme="dark"] .tag-ok, [data-theme="dark"] .tag-approved { background: rgba(46, 190, 140, 0.18); color: #86e3bf; }
[data-theme="dark"] .empty { background: var(--surface); }
[data-theme="dark"] .skeleton-row { background: linear-gradient(100deg, #183246 20%, #1d3d53 40%, #183246 60%); background-size: 220% 100%; }

/* 可访问性：键盘焦点 */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
