/* 晴窗 · 个人学习空间 — 样式表 */

:root {
  --bg: #F7FAF7;
  --surface: #FFFFFF;
  --surface-soft: #FBFAF3;
  --line: #E6EEE7;
  --line-soft: #EFF4EF;
  --ink: #1D2A23;
  --ink-2: #3C4F45;
  --muted: #6E7F75;
  --faint: #93A299;
  --primary: #2F6B4B;
  --primary-strong: #245239;
  --primary-soft: #E8F3EA;
  --primary-softer: #F1F8F2;
  --danger: #B4544C;
  --warn: #8A6D3B;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-s: 0 1px 2px rgba(28, 61, 44, .04);
  --shadow-m: 0 1px 2px rgba(28, 61, 44, .04), 0 10px 26px rgba(28, 61, 44, .055);
  --shadow-l: 0 24px 70px rgba(24, 54, 39, .18);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sidebar-w: 220px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body { overscroll-behavior-y: none; }

a { color: var(--primary); text-decoration: none; }
button { font: inherit; color: inherit; }
svg { display: block; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #D7E3DA; border-radius: 99px; border: 3px solid var(--bg);
}
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 骨架 ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  padding: 18px 14px 16px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 6px 20px;
  text-decoration: none;
  color: inherit;
}
.brand__mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: #2E6A4A;
  display: grid; place-items: center;
  flex: none;
  box-shadow: 0 6px 14px rgba(46, 106, 74, .22);
}
.brand__mark svg { width: 20px; height: 20px; }
.brand__name { font-size: 18px; font-weight: 700; letter-spacing: .5px; line-height: 1.2; }
.brand__sub { font-size: 11.5px; color: var(--faint); letter-spacing: .3px; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav__item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--ink-2);
  font-size: 14.5px;
  transition: background .15s ease, color .15s ease;
  text-decoration: none;
  cursor: pointer;
}
.nav__item svg { width: 19px; height: 19px; opacity: .82; flex: none; }
.nav__item:hover { background: #F5F9F5; }
.nav__item.is-active {
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 600;
}
.nav__item.is-active svg { opacity: 1; }

.sidebar__foot { margin-top: auto; padding-top: 14px; }
.visitor {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #FAFCFA;
  border: 1px solid var(--line-soft);
}
.visitor__icon {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center; flex: none;
}
.visitor__icon svg { width: 16px; height: 16px; }
.visitor__t { font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.visitor__s { font-size: 11px; color: var(--faint); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 68px; padding: 0 30px;
  background: rgba(247, 250, 247, .88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar__title {
  margin: 0; font-size: 16.5px; font-weight: 600; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar__right { display: flex; align-items: center; gap: 10px; }
.topbar__brand { display: none; }

.searchbtn {
  display: flex; align-items: center; gap: 9px;
  height: 38px; padding: 0 12px 0 14px;
  min-width: 268px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--faint);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.searchbtn:hover { border-color: #D3E2D7; box-shadow: var(--shadow-s); }
.searchbtn__icon svg { width: 16px; height: 16px; }
.searchbtn__text { flex: 1; text-align: left; white-space: nowrap; }
.searchbtn kbd {
  font-family: var(--font); font-size: 10.5px;
  color: #9AAAA1;
  border: 1px solid var(--line); border-radius: 6px;
  padding: 1px 5px; background: #FBFDFB; line-height: 1.5;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  transition: transform .06s ease, filter .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(.5px); }
.btn--ghost {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--line);
  box-shadow: var(--shadow-s);
}
.btn--ghost:hover { border-color: #D3E2D7; filter: none; }
.btn--soft { background: var(--primary-soft); color: var(--primary-strong); }
.btn--danger { background: #FBEDEB; color: var(--danger); border-color: #F3DAD6; }
.btn--lg { height: 42px; padding: 0 18px; font-size: 14px; border-radius: 12px; }
.btn--sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn--block { width: 100%; }

.content {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  padding: 22px 30px 72px;
  outline: none;
}

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 244px;
  padding: 34px 40px;
  display: flex;
  align-items: center;
  background: linear-gradient(101deg, #F1F8EC 0%, #E8F3E2 46%, #DCEED8 100%);
}
.hero__bg {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 61%;
  background: url(./assets/hero.webp) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.45) 16%, #000 42%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.45) 16%, #000 42%);
}
.hero__inner { position: relative; z-index: 1; max-width: 55%; }
.hero__date {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: #5E7A67; letter-spacing: .2px;
}
.hero__date svg { width: 15px; height: 15px; opacity: .85; }
.hero__title {
  margin: 10px 0 8px;
  font-size: clamp(30px, 3.1vw, 44px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.5px;
  color: #1F4A38;
}
.hero__sub { margin: 0 0 20px; font-size: 14px; color: #4E6A58; max-width: 30em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- 区块 ---------- */
.section { margin-top: 34px; }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 13px;
}
.section__head h2 { margin: 0; font-size: 18.5px; font-weight: 700; letter-spacing: .1px; }
.section__more {
  font-size: 12.5px; color: var(--primary); background: none; border: 0;
  cursor: pointer; padding: 4px 2px; border-radius: 6px;
}
.section__more:hover { text-decoration: underline; }

.split {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 26px;
  align-items: start;
  margin-top: 34px;
}
.split .section { margin-top: 0; }
.split + .section { margin-top: 34px; }

/* ---------- 网址卡片 ---------- */
.linkgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}
.linkcard {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-s);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
  min-width: 0;
}
.linkcard:hover { transform: translateY(-1px); box-shadow: var(--shadow-m); border-color: #D9E7DC; }
.linkcard__icon {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; flex: none;
}
.linkcard__icon svg { width: 18px; height: 18px; }
.linkcard__body { min-width: 0; flex: 1; display: block; }
.linkcard__t {
  display: block;
  font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.linkcard__s {
  display: block;
  font-size: 11.5px; color: var(--muted); line-height: 1.45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.linkcard__pin { color: #C09A4E; margin-left: auto; flex: none; }
.linkcard__pin svg { width: 14px; height: 14px; }

/* ---------- 卡片 / 列表 ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
  overflow: hidden;
}
.panel--plain { background: transparent; border: 0; box-shadow: none; }

.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  min-width: 0;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: #FAFCFA; }
.row__icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; flex: none;
}
.row__icon svg { width: 17px; height: 17px; }
.row__body { min-width: 0; flex: 1; display: block; }
.row__t {
  display: block;
  font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row__s {
  display: block;
  font-size: 11.5px; color: var(--muted); line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row__date { font-size: 11.5px; color: var(--faint); flex: none; }
.row__act {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  border: 0; background: transparent; color: var(--faint); cursor: pointer; flex: none;
}
.row__act:hover { background: var(--primary-soft); color: var(--primary); }
.row__act svg { width: 16px; height: 16px; }

/* ---------- 手记卡片 ---------- */
.notecard {
  background: var(--surface-soft);
  border: 1px solid #EFEAD8;
  border-radius: var(--radius);
  padding: 15px 16px 14px;
  cursor: pointer;
  transition: box-shadow .15s ease;
}
.notecard:hover { box-shadow: var(--shadow-m); }
.notecard__head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.notecard__tag {
  font-size: 11px; color: var(--warn); background: #F4EDDC;
  border-radius: 6px; padding: 2px 8px; font-weight: 500;
}
.notecard__pin { margin-left: auto; color: #C09A4E; }
.notecard__pin svg { width: 14px; height: 14px; }
.notecard__t { font-size: 15px; font-weight: 700; margin: 0 0 6px; line-height: 1.45; }
.notecard__b {
  font-size: 12.8px; color: #5C6B60; line-height: 1.72; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.notecard__d { font-size: 11px; color: #A0A894; margin-top: 9px; }
.notecard--add {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 13px; margin-top: 10px;
  background: #FFFDF7; border: 1px dashed #E6DFC9; border-radius: 14px;
  color: #7D7558; font-size: 13.5px; font-weight: 500;
}
.notecard--add svg { width: 15px; height: 15px; }

/* ---------- 扩展空间 ---------- */
.extend {
  margin-top: 26px;
  display: flex; align-items: center; gap: 14px;
  padding: 20px 22px;
  border: 1.5px dashed #D6E5D8;
  border-radius: 18px;
  background: rgba(255, 255, 255, .55);
  color: var(--muted);
}
.extend__icon {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: #EFF6F0; color: #79A184;
  display: grid; place-items: center;
}
.extend__icon svg { width: 18px; height: 18px; }
.extend__t { font-size: 14px; font-weight: 600; color: #4C6355; }
.extend__s { font-size: 12px; color: var(--faint); }

/* ---------- 列表页 ---------- */
.listbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.listbar__sp { flex: 1; }
.chip {
  height: 30px; padding: 0 12px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); font-size: 12.5px; cursor: pointer;
}
.chip.is-active { background: var(--primary-soft); border-color: #CFE4D4; color: var(--primary-strong); font-weight: 600; }
.chip__n { color: var(--faint); font-size: 11px; margin-left: 4px; }

.empty {
  padding: 54px 20px; text-align: center; color: var(--faint);
}
.empty__icon {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 16px;
  background: var(--primary-softer); color: #8FB09A;
  display: grid; place-items: center;
}
.empty__icon svg { width: 24px; height: 24px; }
.empty__t { font-size: 14px; color: var(--ink-2); font-weight: 600; margin-bottom: 4px; }
.empty__s { font-size: 12.5px; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 15px;
  box-shadow: var(--shadow-s);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease;
  min-width: 0;
}
.tile:hover { transform: translateY(-1px); box-shadow: var(--shadow-m); }
.tile__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tile__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tile__icon svg { width: 17px; height: 17px; }
.tile__t { font-size: 14px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.tile__s { font-size: 11.5px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.tile__b {
  font-size: 12.6px; color: #5C6B60; line-height: 1.65; margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tile__foot {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--faint); margin-top: 10px;
}
.tagcloud { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }

/* ---------- 弹层 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(24, 40, 31, .34);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fade .16s ease;
}
.overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  width: 100%;
  max-width: 520px;
  max-height: min(86vh, 760px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-l);
  padding: 20px 22px 18px;
  animation: pop .18s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.sheet--wide { max-width: 640px; }
.sheet__head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.sheet__title { font-size: 16px; font-weight: 700; margin: 0; flex: 1; }
.sheet__close {
  width: 32px; height: 32px; border-radius: 9px; border: 0; background: #F5F8F5;
  color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none;
}
.sheet__close:hover { background: #EDF3EE; color: var(--ink); }
.sheet__close svg { width: 16px; height: 16px; }

.field { margin-bottom: 13px; }
.field__label { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin-bottom: 6px; }
.field__hint { font-size: 11.5px; color: var(--faint); margin-top: 5px; }
.input, .textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #FCFDFC;
  font: inherit; font-size: 14px; color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .textarea:focus {
  border-color: #A9CDB6;
  box-shadow: 0 0 0 3px rgba(47, 107, 75, .1);
  background: #fff;
}
.textarea { resize: vertical; min-height: 96px; line-height: 1.7; }
.formrow { display: flex; gap: 10px; }
.formrow > * { flex: 1; min-width: 0; }
.sheet__foot { display: flex; gap: 9px; justify-content: flex-end; margin-top: 18px; }

.menu { display: flex; flex-direction: column; gap: 8px; }
.menu__item {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 14px; border-radius: 13px; border: 1px solid var(--line);
  background: #FDFEFD; cursor: pointer; text-align: left; width: 100%;
  transition: border-color .15s ease, background .15s ease;
}
.menu__item:hover { border-color: #CFE4D4; background: var(--primary-softer); }
.menu__icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.menu__icon svg { width: 17px; height: 17px; }
.menu__t { font-size: 14px; font-weight: 600; }
.menu__s { font-size: 11.5px; color: var(--muted); }

/* ---------- 搜索面板 ---------- */
.searchsheet { max-width: 640px; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.searchbox { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line-soft); }
.searchbox svg { width: 18px; height: 18px; color: var(--faint); flex: none; }
.searchbox input {
  flex: 1; border: 0; outline: none; background: transparent; font: inherit; font-size: 15.5px;
}
.searchresults { overflow-y: auto; padding: 8px; max-height: 62vh; }
.searchgroup { padding: 8px 10px 4px; font-size: 11px; color: var(--faint); font-weight: 600; letter-spacing: .4px; }
.hit { padding: 2px 10px; }
.hit:hover { background: #F6FAF6; border-radius: 10px; }

/* ---------- 底部导航 ---------- */
.tabbar { display: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(26px + var(--safe-b)); transform: translateX(-50%);
  z-index: 120;
  background: rgba(29, 42, 35, .93);
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 99px;
  box-shadow: 0 12px 30px rgba(20, 40, 28, .28);
  max-width: calc(100vw - 40px);
  animation: toastin .2s ease;
  pointer-events: none;
}
.toast[hidden] { display: none; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 其它 ---------- */
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px;
  background: #FDF7EC; border: 1px solid #F0E3C8;
  color: #7A6437; font-size: 12.5px; line-height: 1.6;
  margin-bottom: 16px;
}
.notice svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.notice--info { background: var(--primary-softer); border-color: #D8E9DC; color: #3D6349; }

.kv { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line-soft); }
.kv:last-child { border-bottom: 0; }
.kv__k { font-size: 13.5px; color: var(--ink-2); flex: 1; }
.kv__v { font-size: 12.5px; color: var(--muted); }
.sync-controls { min-width: 0; margin: 0; padding: 0; border: 0; }
.sync-code-row, .sync-actions { display: flex; align-items: center; gap: 10px; }
.sync-code-row .input { flex: 1; min-width: 0; }
.sync-actions { margin-top: 12px; flex-wrap: wrap; }
.sync-controls:disabled .btn { opacity: .65; cursor: wait; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.hidden { display: none !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .linkgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .sidebar { display: none; }
  .tabbar {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    height: calc(60px + var(--safe-b));
    padding: 6px 6px var(--safe-b);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .tabbar__item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; font-size: 10.5px; color: #7C8C82; text-decoration: none;
    border-radius: 12px; padding: 4px 2px; min-width: 0;
  }
  .tabbar__item svg { width: 21px; height: 21px; }
  .tabbar__item.is-active { color: var(--primary-strong); background: var(--primary-soft); font-weight: 600; }
  .tabbar__item.is-active svg { color: var(--primary); }

  .topbar { height: 62px; padding: 0 16px; }
  .topbar__title { display: none; }
  .topbar__brand { display: flex; align-items: center; gap: 9px; }
  .topbar__brand .brand__mark { width: 34px; height: 34px; border-radius: 10px; }
  .topbar__brand .brand__mark svg { width: 17px; height: 17px; }
  .topbar__brand .brand__name { font-size: 15.5px; }
  .topbar__brand .brand__sub { font-size: 10px; }
  .searchbtn { min-width: 0; width: 38px; padding: 0; justify-content: center; height: 36px; border-radius: 10px; }
  .searchbtn__text, .searchbtn kbd { display: none; }
  .btn--new { height: 36px; padding: 0 12px; border-radius: 10px; }

  .content { padding: 14px 16px calc(84px + var(--safe-b)); }

  .hero { display: block; padding: 20px 18px 0; min-height: 0; border-radius: 20px; }
  .hero__inner { max-width: 100%; }
  .hero__title { margin: 8px 0 6px; font-size: 28px; }
  .hero__sub { font-size: 12.8px; margin-bottom: 14px; }
  .hero__bg {
    position: relative; right: auto; top: auto; bottom: auto;
    width: auto; height: 178px;
    margin: 14px -18px 0;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.55) 16%, #000 40%);
    mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.55) 16%, #000 40%);
  }
  .hero__actions { gap: 8px; }
  .btn--lg { height: 38px; padding: 0 14px; font-size: 13px; border-radius: 10px; }

  .linkgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .linkgrid--manage { grid-template-columns: minmax(0, 1fr); }
  .linkcard { padding: 11px 12px; gap: 10px; border-radius: 13px; }
  .linkcard__icon { width: 34px; height: 34px; border-radius: 10px; }
  .linkcard__t { font-size: 13.5px; }
  .linkcard__s { font-size: 11px; }

  .split { grid-template-columns: 1fr; gap: 0; margin-top: 26px; }
  .split .section + .section { margin-top: 28px; }
  .section { margin-top: 26px; }
  .section__head h2 { font-size: 16.5px; }

  .row { padding: 11px 12px; gap: 10px; }
  .row__t { font-size: 13.5px; }
  .row__date { display: none; }

  .grid2, .grid3 { grid-template-columns: 1fr; }

  /* 列表页工具条：标签横向滚动 + 按钮整行 */
  .listbar { gap: 8px; }
  .chips {
    flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto;
    padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chips > * { flex: 0 0 auto; }
  .listbar__sp { display: none; }
  .listbar > .btn { flex: 1 1 100%; justify-content: center; height: 38px; }

  .overlay { padding: 0; align-items: flex-end; }
  .sheet {
    max-width: 100%;
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
    padding: 18px 16px calc(16px + var(--safe-b));
    animation: sheetup .22s cubic-bezier(.22,.8,.3,1);
  }
  @keyframes sheetup { from { transform: translateY(100%); } to { transform: none; } }
  .searchsheet { margin: 0 10px; border-radius: 18px; }
  .toast { bottom: calc(78px + var(--safe-b)); }
}

@media (min-width: 961px) {
  .tabbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
