/* ============================================================
   AlgoRay 工作台 · iOS 风
   浅色 / 深色 · 小卡片 · 零外部依赖
   ============================================================ */

:root {
  color-scheme: light;
  --bg: #f2f2f7;
  --bg-solid: #f7f7fa;
  --surface: rgba(255, 255, 255, .74);
  --surface-solid: #ffffff;
  --surface-hover: rgba(255, 255, 255, .96);
  --fill: rgba(118, 118, 128, .09);
  --fill-strong: rgba(118, 118, 128, .13);
  --text: #12141a;
  --text-2: #686d7a;
  --text-3: #9a9fab;
  --line: rgba(60, 60, 67, .10);
  --line-strong: rgba(60, 60, 67, .18);
  --blue: #007aff;
  --blue-soft: rgba(0, 122, 255, .10);
  --danger: #ff3b30;
  --card-shadow: 0 1px 2px rgba(18, 24, 40, .035), 0 9px 22px -14px rgba(18, 24, 40, .30);
  --card-shadow-hover: 0 2px 4px rgba(18, 24, 40, .05), 0 18px 34px -16px rgba(18, 24, 40, .34);
  --nav-bg: rgba(246, 246, 249, .74);
  --sheen: rgba(255, 255, 255, .85);
  --ease: cubic-bezier(.22, .8, .28, 1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg-solid: #101319;
  --surface: rgba(29, 31, 38, .72);
  --surface-solid: #1b1e25;
  --surface-hover: rgba(38, 41, 49, .96);
  --fill: rgba(118, 118, 128, .17);
  --fill-strong: rgba(118, 118, 128, .24);
  --text: #f3f4f8;
  --text-2: #a3a8b4;
  --text-3: #727784;
  --line: rgba(255, 255, 255, .085);
  --line-strong: rgba(255, 255, 255, .18);
  --blue: #0a84ff;
  --blue-soft: rgba(10, 132, 255, .16);
  --danger: #ff453a;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .28), 0 10px 26px -16px rgba(0, 0, 0, .8);
  --card-shadow-hover: 0 2px 6px rgba(0, 0, 0, .34), 0 20px 38px -16px rgba(0, 0, 0, .9);
  --nav-bg: rgba(13, 15, 20, .72);
  --sheen: rgba(255, 255, 255, .07);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .3s ease, color .3s ease;
}

button, input, select { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

::selection { background: rgba(0, 122, 255, .22); }

/* ---------- 背景光晕 ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; display: block; border-radius: 50%; filter: blur(90px); }
.b1 { width: 520px; height: 520px; top: -240px; left: -120px; background: radial-gradient(circle, rgba(88, 140, 255, .16), transparent 70%); }
.b2 { width: 460px; height: 460px; top: -180px; right: -140px; background: radial-gradient(circle, rgba(168, 116, 255, .14), transparent 70%); }
[data-theme="dark"] .b1 { background: radial-gradient(circle, rgba(52, 104, 235, .20), transparent 70%); }
[data-theme="dark"] .b2 { background: radial-gradient(circle, rgba(132, 74, 226, .18), transparent 70%); }

.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ---------- 顶栏 ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(140deg, #4f9bff, #6c5ce7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 3px 9px -3px rgba(79, 105, 230, .65);
  display: grid; place-items: center;
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-text { display: flex; align-items: baseline; gap: 8px; }
.brand-text strong { font-size: 16px; font-weight: 680; letter-spacing: -.025em; }
.brand-text small { font-size: 9.5px; font-weight: 650; letter-spacing: .13em; color: var(--text-3); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-btn {
  height: 31px; min-width: 31px; padding: 0 9px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--text-2);
  font-size: 12.5px; font-weight: 550;
  transition: background .18s, color .18s, border-color .18s, transform .18s var(--ease);
}
.nav-btn:hover { background: var(--surface-hover); color: var(--text); border-color: var(--line-strong); }
.nav-btn:active { transform: scale(.95); }
.nav-btn.icon-only { padding: 0; }
.nav-btn svg { width: 16px; height: 16px; }
[data-theme="light"] .i-sun, [data-theme="dark"] .i-moon { display: none; }
.text-btn.active { background: var(--blue); border-color: transparent; color: #fff; }
.text-btn.active:hover { background: var(--blue); color: #fff; }

/* ---------- Hero ---------- */
.hero { padding-top: 42px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.hero h1 { margin: 0; font-size: 34px; font-weight: 720; letter-spacing: -.035em; line-height: 1.14; }
.hero-sub { margin: 7px 0 0; font-size: 13px; color: var(--text-2); letter-spacing: 0; }
.hero-date { padding-bottom: 3px; font-size: 12px; color: var(--text-3); white-space: nowrap; letter-spacing: 0; }

/* ---------- 搜索 ---------- */
.search {
  margin-top: 22px; height: 42px;
  display: flex; align-items: center; gap: 9px;
  padding: 0 11px 0 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--fill);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.search:focus-within { border-color: rgba(0, 122, 255, .55); box-shadow: 0 0 0 3px var(--blue-soft); background: var(--surface); }
.search-ico { width: 17px; height: 17px; color: var(--text-3); flex-shrink: 0; }
.search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font-size: 14px; color: var(--text);
}
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd {
  flex-shrink: 0; padding: 2px 6px; border-radius: 5px;
  border: 1px solid var(--line); background: var(--surface);
  font-family: inherit; font-size: 10.5px; color: var(--text-3); letter-spacing: .02em;
}
.clear-btn { width: 20px; height: 20px; padding: 3px; border: 0; border-radius: 50%; background: var(--fill-strong); color: var(--text-2); }
.clear-btn svg { width: 100%; height: 100%; }

/* ---------- 分类 ---------- */
.chips { display: flex; gap: 7px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; height: 29px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text-2);
  font-size: 12.5px; font-weight: 520; white-space: nowrap;
  transition: background .18s, color .18s, border-color .18s, transform .18s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip:active { transform: scale(.95); }
.chip.active { background: var(--blue); border-color: transparent; color: #fff; box-shadow: 0 3px 10px -4px rgba(0, 122, 255, .8); }
.chip .n { margin-left: 5px; font-size: 10.5px; opacity: .62; font-variant-numeric: tabular-nums; }

/* ---------- 编辑条 ---------- */
.edit-bar {
  margin-top: 14px; height: 40px; padding: 0 8px 0 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--blue-soft); color: var(--text-2); font-size: 12px;
}
.edit-bar[hidden], .clear-btn[hidden], .btn-ghost[hidden] { display: none; }
.edit-bar-actions { display: flex; align-items: center; gap: 7px; }
.edit-bar button { height: 27px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 12px; }
.edit-bar button:hover { background: var(--surface-hover); }
.edit-bar .primary-mini { background: var(--blue); border-color: transparent; color: #fff; }
.edit-bar .primary-mini:hover { background: var(--blue); }

/* ---------- 卡片网格 ---------- */
.grid { margin-top: 18px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }

.card {
  position: relative; min-height: 116px; padding: 14px;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s, background .24s;
  animation: rise .5s var(--ease) both;
  animation-delay: var(--d, 0ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(9px) scale(.985); } to { opacity: 1; transform: none; } }
.card::before {
  content: ""; position: absolute; top: 0; left: 14px; right: 14px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--sheen), transparent); pointer-events: none;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-hover); border-color: var(--line-strong); background: var(--surface-hover); }
.card:active { transform: translateY(-1px) scale(.985); }
.card:focus-within { border-color: rgba(0, 122, 255, .6); box-shadow: 0 0 0 3px var(--blue-soft); }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.app-icon {
  width: 38px; height: 38px; border-radius: 11.5px;
  display: grid; place-items: center; flex-shrink: 0;
  color: #fff;
  background: linear-gradient(140deg, var(--c1), var(--c2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), inset 0 -1px 0 rgba(0, 0, 0, .06), 0 5px 11px -5px var(--c1);
  position: relative;
}
.app-icon::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 28% 18%, rgba(255, 255, 255, .26), transparent 58%); pointer-events: none; }
.app-icon svg { width: 21px; height: 21px; position: relative; z-index: 1; }
.go-arrow {
  width: 19px; height: 19px; color: var(--text-3); opacity: 0;
  transform: translate(-2px, 2px);
  transition: opacity .2s, transform .2s var(--ease);
}
.go-arrow svg { width: 100%; height: 100%; }
.card:hover .go-arrow, .card:focus-within .go-arrow { opacity: 1; transform: none; }
.card-text { min-width: 0; }
.card-title {
  margin: 0; font-size: 14.5px; font-weight: 640; letter-spacing: -.015em; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-sub {
  margin: 2px 0 0; font-size: 11.5px; line-height: 1.4; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0;
}
.card-hit { position: absolute; inset: 0; z-index: 2; border-radius: inherit; outline: none; }
.card-hit:focus-visible { box-shadow: inset 0 0 0 2px var(--blue); }

/* 编辑态 */
.editing .card { cursor: grab; }
.editing .card:hover { transform: none; box-shadow: var(--card-shadow); }
.editing .card-hit { display: none; }
.editing .go-arrow { display: none; }
.card-tools { display: none; gap: 5px; position: relative; z-index: 3; }
.editing .card-tools { display: flex; }
.tool-btn {
  width: 24px; height: 24px; padding: 5px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--surface-hover); color: var(--text-2);
}
.tool-btn svg { width: 100%; height: 100%; }
.tool-btn:hover { color: var(--blue); border-color: rgba(0, 122, 255, .4); }
.tool-btn.del:hover { color: var(--danger); border-color: rgba(255, 59, 48, .4); }
.card.drag-over { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); transform: scale(1.02); }
.card.dragging { opacity: .45; }

/* 添加卡片 */
.add-card {
  min-height: 116px; border: 1.5px dashed var(--line-strong); border-radius: 18px;
  background: transparent; color: var(--text-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; transition: border-color .2s, color .2s, background .2s;
}
.add-card svg { width: 19px; height: 19px; }
.add-card:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }

/* ---------- 空态 / 页脚 ---------- */
.empty { padding: 64px 0 48px; text-align: center; color: var(--text-3); }
.empty svg { width: 28px; height: 28px; margin: 0 auto 12px; opacity: .6; }
.empty p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.footer {
  margin-top: 46px; padding: 20px 0 34px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: var(--text-3); letter-spacing: 0;
}
.footer-right { font-size: 10px; font-weight: 650; letter-spacing: .11em; }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 12px;
  background: rgba(28, 30, 36, .92); color: #fff;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  font-size: 12.5px; white-space: nowrap; pointer-events: auto;
  animation: toast-in .26s var(--ease) both;
}
.toast.out { animation: toast-out .24s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(.97); } }
.toast button { border: 0; background: transparent; color: #7db6ff; font-size: 12.5px; font-weight: 600; padding: 0; }

/* ---------- Sheet ---------- */
.sheet-layer { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.sheet-layer[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 12, 18, .38); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .22s ease both; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: relative; width: min(420px, 100%); max-height: min(88vh, 760px); overflow-y: auto;
  padding: 20px; border: 1px solid var(--line); border-radius: 22px;
  background: var(--surface-solid); box-shadow: 0 26px 70px -14px rgba(0, 0, 0, .38);
  animation: pop .3s var(--ease) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-head h2 { margin: 0; font-size: 17px; font-weight: 660; letter-spacing: -.02em; }
.sheet-close { width: 27px; height: 27px; padding: 5px; border: 0; border-radius: 50%; background: var(--fill); color: var(--text-2); }
.sheet-close svg { width: 100%; height: 100%; }
.sheet-close:hover { background: var(--fill-strong); color: var(--text); }

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; margin-bottom: 5px; font-size: 11.5px; font-weight: 550; color: var(--text-2); }
.field input[type="text"], .field input:not([type]), .field input[type="url"], .field input[name] {
  width: 100%; height: 37px; padding: 0 11px;
  border: 1px solid transparent; border-radius: 10px; outline: 0;
  background: var(--fill); font-size: 13.5px; color: var(--text);
  transition: border-color .18s, box-shadow .18s;
}
.field input::placeholder { color: var(--text-3); }
.field input:focus { border-color: rgba(0, 122, 255, .6); box-shadow: 0 0 0 3px var(--blue-soft); }
.field input[name="id"], .field input[type="hidden"] { display: none; }

.icon-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(32px, 1fr)); gap: 6px; }
.icon-opt {
  aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 9px;
  background: var(--fill); color: var(--text-2); display: grid; place-items: center;
  transition: border-color .16s, color .16s, transform .16s var(--ease);
}
.icon-opt svg { width: 17px; height: 17px; }
.icon-opt:hover { transform: translateY(-1px); color: var(--text); }
.icon-opt.sel { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }

.swatches { display: flex; gap: 9px; }
.swatch { width: 25px; height: 25px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: linear-gradient(140deg, var(--c1), var(--c2)); transition: transform .16s var(--ease), box-shadow .16s; }
.swatch:hover { transform: scale(1.1); }
.swatch.sel { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px var(--blue); }

.sheet-actions { display: flex; align-items: center; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.spacer { flex: 1; }
.btn-primary, .btn-ghost { height: 36px; padding: 0 16px; border-radius: 10px; font-size: 13px; font-weight: 580; border: 1px solid transparent; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--fill); color: var(--text-2); }
.btn-ghost:hover { background: var(--fill-strong); color: var(--text); }
.btn-ghost.danger { background: transparent; color: var(--danger); }
.btn-ghost.danger:hover { background: rgba(255, 59, 48, .1); }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .nav-inner { height: 54px; }
  .brand-text small { display: none; }
  .hero { padding-top: 30px; }
  .hero h1 { font-size: 30px; }
  .hero-date { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { min-height: 112px; padding: 13px; border-radius: 16px; }
  .add-card { min-height: 112px; border-radius: 16px; }
  .app-icon { width: 36px; height: 36px; border-radius: 11px; }
  .card-title { font-size: 14px; }
  .card-sub { font-size: 11px; }
  .footer { margin-top: 34px; }
  .sheet-layer { place-items: end center; padding: 0; }
  .sheet { width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0; border-bottom: 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); animation: sheet-up .3s var(--ease) both; }
  @keyframes sheet-up { from { opacity: .6; transform: translateY(24px); } }
  .icon-picker { grid-template-columns: repeat(auto-fit, minmax(30px, 1fr)); gap: 5px; }
}
@media (max-width: 350px) {
  .grid { gap: 8px; }
  .card { padding: 11px; }
  .card-title { font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ============================================================
   v3.1 · 多视图 / 介绍 / 设置 / 最近打开
   ============================================================ */

/* 作者样式里的 display:flex 会盖掉 UA 的 [hidden]，统一兜底 */
[hidden] { display: none !important; }
.nav-inner { position: relative; }

/* 顶部 iOS 分段控件 */
.seg {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; padding: 2px; gap: 2px;
  border-radius: 9px; background: var(--fill);
}
.seg button {
  height: 26px; padding: 0 13px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text-3);
  font-size: 12px; font-weight: 550; white-space: nowrap;
  transition: background .18s, color .18s, box-shadow .18s;
}
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--surface-solid); color: var(--text); font-weight: 640; box-shadow: 0 1px 3px rgba(18, 24, 40, .18), 0 0 0 .5px rgba(18, 24, 40, .06); }

/* 底部 Tab Bar（移动端） */
.tabbar { display: none; }

/* 最近打开 */
.recent { display: flex; align-items: center; gap: 10px; margin-top: 12px; min-width: 0; }
.recent-label { flex-shrink: 0; font-size: 11px; color: var(--text-3); }
.recent-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.recent-list::-webkit-scrollbar { display: none; }
.recent-item {
  display: inline-flex; align-items: center; gap: 6px; height: 27px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text-2);
  font-size: 11.5px; white-space: nowrap;
  transition: color .18s, border-color .18s, background .18s;
}
.recent-item:hover { color: var(--blue); border-color: var(--blue); background: var(--blue-soft); }
.recent-item i { width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(140deg, var(--c1), var(--c2)); }

/* 页面通用 */
.page-head { padding-top: 42px; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 34px; font-weight: 720; letter-spacing: -.035em; line-height: 1.14; }
.page-head p { margin: 7px 0 0; font-size: 13px; color: var(--text-2); }
.panel {
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--card-shadow);
}
.section-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 26px 0 10px; padding: 0 2px;
  font-size: 13px; font-weight: 650; letter-spacing: -.01em;
}
.section-title span { font-size: 11px; font-weight: 400; color: var(--text-3); }
.about-foot { margin: 26px 0 0; text-align: center; font-size: 11px; color: var(--text-3); }

/* 介绍 · Hero */
.about-hero { display: flex; align-items: center; gap: 16px; padding: 20px; }
.about-logo {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #4f9bff, #6c5ce7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 6px 16px -7px rgba(79, 105, 230, .8);
}
.about-logo svg { width: 34px; height: 34px; }
.about-hero-copy h2 { margin: 0; font-size: 20px; font-weight: 680; letter-spacing: -.025em; }
.about-hero-copy p { margin: 3px 0 0; font-size: 12px; color: var(--text-2); }
.about-stats { display: flex; gap: 26px; margin-left: auto; padding-left: 16px; }
.about-stats div { display: flex; flex-direction: column; align-items: flex-end; }
.about-stats b { font-size: 22px; font-weight: 680; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.about-stats span { font-size: 10.5px; color: var(--text-3); letter-spacing: .04em; }

/* 介绍 · 领域分布 */
.dist-list { padding: 6px 16px; }
.dist-row {
  display: grid; grid-template-columns: 92px 1fr 26px; align-items: center; gap: 12px;
  width: 100%; height: 40px; padding: 0;
  border: 0; border-bottom: 1px solid var(--line);
  background: transparent; text-align: left; color: var(--text);
}
.dist-row:last-child { border-bottom: 0; }
.dist-row:hover .dist-name { color: var(--blue); }
.dist-name { font-size: 12.5px; font-weight: 540; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dist-track { display: block; height: 6px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.dist-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.dist-num { text-align: right; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* 介绍 · 收录清单 */
.app-list { padding: 3px 0; overflow: hidden; }
.app-row {
  display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 7px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .18s;
}
.app-row:last-child { border-bottom: 0; }
.app-row:hover { background: var(--fill); }
.app-row .row-icon {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--c1), var(--c2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.app-row .row-icon svg { width: 16px; height: 16px; }
.app-row .row-title { font-size: 13px; font-weight: 560; }
.app-row .row-cat { margin-left: auto; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.app-row .row-arrow { width: 14px; height: 14px; color: var(--text-3); flex-shrink: 0; }
.app-row:hover .row-arrow { color: var(--blue); }

/* 介绍 · 时间线 / 键盘 */
.timeline { padding: 8px 16px; }
.tl-item { position: relative; display: flex; gap: 14px; padding: 8px 0 8px 14px; border-bottom: 1px solid var(--line); }
.tl-item:last-child { border-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 0; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.tl-item time { flex-shrink: 0; width: 76px; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tl-item span { font-size: 12.5px; color: var(--text-2); }
.kbd-list { padding: 4px 16px; }
.kbd-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.kbd-list > div:last-child { border-bottom: 0; }
.kbd-list kbd { padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--fill); color: var(--text-2); font-family: inherit; font-size: 10.5px; }

/* 设置 · 分组列表 */
.settings-group { margin-bottom: 22px; }
.group-label { margin: 0 0 8px 4px; font-size: 10.5px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); }
.group-card { padding: 0; overflow: hidden; }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 50px; padding: 9px 14px;
  border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--text);
  font-size: 13.5px; text-align: left;
}
.set-row:last-child { border-bottom: 0; }
.set-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.set-label small { font-size: 11px; color: var(--text-3); }
.set-value { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.set-row.action { cursor: pointer; transition: background .18s; }
.set-row.action:hover { background: var(--fill); }
.set-row.action svg { width: 15px; height: 15px; color: var(--text-3); flex-shrink: 0; }
.set-row.action.danger { color: var(--danger); }
.set-row.action.danger svg { color: var(--danger); }

.seg-mini { display: inline-flex; padding: 2px; gap: 2px; border-radius: 8px; background: var(--fill); flex-shrink: 0; }
.seg-mini button {
  height: 26px; padding: 0 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text-2); font-size: 11.5px; white-space: nowrap;
  transition: background .18s, color .18s, box-shadow .18s;
}
.seg-mini button:hover { color: var(--text); }
.seg-mini button.on { background: var(--surface-solid); color: var(--text); box-shadow: 0 1px 3px rgba(18, 24, 40, .14); }

.mini-colors { display: flex; gap: 8px; flex-shrink: 0; }
.mini-color { width: 22px; height: 22px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: var(--mc); transition: transform .16s var(--ease), box-shadow .16s; }
.mini-color:hover { transform: scale(1.1); }
.mini-color.on { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px var(--blue); }

.switch { position: relative; width: 44px; height: 27px; padding: 0; border: 0; border-radius: 999px; background: var(--fill-strong); flex-shrink: 0; transition: background .2s; }
.switch span { position: absolute; left: 3px; top: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .22); transition: transform .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--blue); }
.switch[aria-checked="true"] span { transform: translateX(17px); }

/* 设置 · 密度 / 副标题 */
[data-density="comfortable"] .grid { gap: 14px; }
[data-density="comfortable"] .card, [data-density="comfortable"] .add-card { min-height: 136px; padding: 16px; }
[data-density="comfortable"] .app-icon { width: 42px; height: 42px; border-radius: 12px; }
[data-density="comfortable"] .app-icon svg { width: 23px; height: 23px; }
[data-sub="off"] .card-sub { display: none; }

/* 移动端收口（置于最后，覆盖前面基础规则） */
@media (max-width: 620px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .seg { display: none; }
  .nav-inner { justify-content: space-between; }
  .page-head { padding-top: 30px; }
  .page-head h1 { font-size: 30px; }
  .about-hero { flex-wrap: wrap; padding: 16px; gap: 12px; }
  .about-stats { width: 100%; margin-left: 0; padding-left: 0; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
  .about-stats div { align-items: flex-start; }
  .dist-row { grid-template-columns: 78px 1fr 22px; gap: 9px; }
  .tl-item { flex-direction: column; gap: 3px; }
  .set-row { min-height: 48px; padding: 8px 12px; }
  .seg-mini button { padding: 0 7px; font-size: 11px; }
  .set-label small { display: none; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: flex; align-items: stretch; justify-content: space-around;
    height: calc(58px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: var(--nav-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
  .tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; background: transparent; color: var(--text-3);
    font-size: 10px; letter-spacing: 0;
  }
  .tabbar button svg { width: 21px; height: 21px; }
  .tabbar button.active { color: var(--blue); }
}
