/* ============================================================
   NEXUS · 个人聚合导航站
   深色科技风：光纤光带 / 玻璃卡片 / 细描边
   ============================================================ */
:root {
  --bg: #04060b;
  --bg-2: #070a12;
  --panel: rgba(13, 18, 28, 0.72);
  --panel-solid: #0b1018;
  --ink: #e9eef7;
  --dim: #8493a8;
  --dimmer: #5b6879;
  --line: rgba(140, 170, 210, 0.12);
  --line-strong: rgba(140, 170, 210, 0.26);
  --cyan: #5be1ff;
  --cyan-deep: #22a7d8;
  --violet: #a78bfa;
  --green: #3ddc97;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 16px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; color: inherit; }
::selection { background: rgba(91, 225, 255, 0.28); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(140, 170, 210, 0.16); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(140, 170, 210, 0.3); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================== 登录 · 首页 ============================== */
body.gate {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background:
    radial-gradient(80% 60% at 62% 42%, rgba(24, 78, 112, 0.32), transparent 70%),
    radial-gradient(60% 50% at 12% 90%, rgba(64, 40, 120, 0.22), transparent 70%),
    var(--bg);
}

#fiber { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 40%, rgba(2, 3, 6, 0.85) 100%);
}

.gate > header, .gate > main, .gate > footer { position: relative; z-index: 2; }

.nav {
  display: flex; align-items: center; gap: 28px;
  padding: 22px clamp(20px, 4vw, 56px);
  font-size: 13px; color: var(--dim);
  border-bottom: 1px solid rgba(140, 170, 210, 0.06);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; letter-spacing: 0.14em; font-size: 13px; }
.brand .glyph {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(91, 225, 255, 0.22), rgba(167, 139, 250, 0.16));
  border: 1px solid rgba(91, 225, 255, 0.35);
  box-shadow: 0 0 22px rgba(91, 225, 255, 0.18);
  font-size: 13px; color: var(--cyan);
}
.brand em { font-style: normal; color: var(--dimmer); letter-spacing: 0.22em; font-size: 11px; font-weight: 400; }
.nav-spacer { flex: 1; }
.nav-links { display: flex; gap: 22px; }
.nav-links span { opacity: 0.75; }
@media (max-width: 760px) { .nav-links { display: none; } }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(10, 16, 24, 0.6);
  font-size: 11.5px; color: #b9c7d8; letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); display: inline-block; }
.dot.off { background: var(--red); box-shadow: 0 0 10px var(--red); }
.dot.warn { background: var(--amber); box-shadow: 0 0 10px var(--amber); }

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
  padding: clamp(24px, 6vh, 72px) clamp(20px, 4vw, 56px) 40px;
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; align-items: start; padding-top: 24px; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  color: #9fb4cc; text-transform: uppercase; margin-bottom: 26px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  border: 1px solid rgba(91, 225, 255, 0.18); background: rgba(9, 20, 32, 0.5);
}

.hero h1 {
  margin: 0 0 26px;
  font-size: clamp(44px, 6.4vw, 92px);
  line-height: 1.09;
  font-weight: 200;
  letter-spacing: 0.02em;
  color: #f2f6fb;
}
.hero h1 .thin { display: block; color: transparent; -webkit-text-stroke: 1px rgba(196, 220, 245, 0.62); margin-top: 2px; }
.hero h1 .accent {
  background: linear-gradient(96deg, #79e9ff, #b7a5ff 60%, #79e9ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead {
  max-width: 520px; margin: 0 0 34px;
  font-size: 14.5px; line-height: 2; color: #93a3b8; letter-spacing: 0.01em;
}
.hero p.lead b { color: #cfdcec; font-weight: 500; }

.login-card {
  width: min(420px, 100%);
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 23, 34, 0.86), rgba(8, 12, 19, 0.92));
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.field { margin-bottom: 12px; position: relative; }
.field label {
  display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dimmer); margin-bottom: 8px;
}
.field input {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(4, 8, 14, 0.7);
  font-size: 14px; letter-spacing: 0.06em; outline: none; transition: 0.18s;
}
.field input:focus { border-color: rgba(91, 225, 255, 0.55); box-shadow: 0 0 0 3px rgba(91, 225, 255, 0.1); }
.field input::placeholder { color: #4d5a6b; letter-spacing: 0.02em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04); color: var(--ink);
  font-size: 13px; cursor: pointer; transition: 0.18s; letter-spacing: 0.02em;
}
.btn:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(140, 170, 210, 0.4); }
.btn.primary {
  background: linear-gradient(120deg, #7ce9ff, #9f8dff);
  color: #06111a; border: none; font-weight: 600;
  box-shadow: 0 10px 30px -12px rgba(91, 225, 255, 0.7);
}
.btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--dim); }
.btn.ghost:hover { color: var(--ink); }
.btn.danger { border-color: rgba(248, 113, 113, 0.35); color: #fca5a5; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.gate .btn.block { margin-top: 6px; padding: 13px; }

.msg { min-height: 18px; margin-top: 12px; font-size: 12.5px; color: var(--red); letter-spacing: 0.02em; }
.msg.ok { color: var(--green); }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px;
  font-family: var(--mono); font-size: 11px; color: var(--dimmer); letter-spacing: 0.08em;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }

/* 右侧数据 */
.hero-stats {
  display: flex; flex-direction: column; gap: 26px; align-items: flex-end;
  position: relative; padding: 10px 0 10px 30px;
}
.hero-stats::before {
  content: ""; position: absolute; inset: -60px -60px -60px -40px; z-index: -1; pointer-events: none;
  background: radial-gradient(75% 65% at 85% 50%, rgba(3, 6, 11, 0.97) 0%, rgba(3, 6, 11, 0.86) 45%, rgba(3, 6, 11, 0.25) 78%, transparent 100%);
}
@media (max-width: 980px) { .hero-stats { align-items: stretch; margin-top: 8px; } }
.stat { text-align: right; min-width: 200px; }
@media (max-width: 980px) { .stat { text-align: left; } }
.stat .k {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: #93a5bb;
  text-transform: uppercase; margin-bottom: 4px;
  text-shadow: 0 0 12px rgba(4, 6, 11, 0.98), 0 0 3px rgba(4, 6, 11, 1);
}
.stat .v {
  font-size: 34px; font-weight: 200; letter-spacing: 0.01em; color: #f2f7fd; line-height: 1.1;
  text-shadow: 0 0 18px rgba(4, 6, 11, 0.98), 0 0 5px rgba(4, 6, 11, 1);
}
.stat .v small { font-size: 12px; color: var(--dimmer); margin-left: 6px; letter-spacing: 0.08em; }
.stat .bar { height: 1px; background: linear-gradient(90deg, transparent, rgba(140, 170, 210, 0.35)); margin-top: 10px; }

.gate footer {
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 18px clamp(20px, 4vw, 56px) 26px;
  font-family: var(--mono); font-size: 10.5px; color: #48566a; letter-spacing: 0.1em;
  border-top: 1px solid rgba(140, 170, 210, 0.05);
}

/* ============================== 控制台 ============================== */
body.app { height: 100vh; overflow: hidden; background: var(--bg); }

.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); height: 100vh; }

.rail {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #0a0f17, #05080d);
  backdrop-filter: blur(18px);
  overflow-y: auto;
}
.rail .brand { padding: 4px 8px 16px; }

.rail-section {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em; color: #4a5769;
  padding: 14px 10px 6px; text-transform: uppercase;
}

.cat {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
  color: #9dadc2; font-size: 13px; border: 1px solid transparent; transition: 0.15s;
  user-select: none;
}
.cat:hover { background: rgba(255, 255, 255, 0.035); color: var(--ink); }
.cat.active { background: rgba(91, 225, 255, 0.07); border-color: rgba(91, 225, 255, 0.22); color: #e6f7ff; }
.cat .c-dot { width: 7px; height: 7px; border-radius: 2px; flex: none; box-shadow: 0 0 8px currentColor; }
.cat .c-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat .c-n { font-family: var(--mono); font-size: 10.5px; color: #58677a; }

.svc { display: flex; align-items: center; gap: 9px; padding: 7px 10px; font-size: 12px; color: #8a99ad; border-radius: 8px; }
.svc a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc .lat { font-family: var(--mono); font-size: 10px; color: #526174; }

.rail-foot { margin-top: auto; padding: 14px 8px 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
  cursor: pointer; color: #8b9ab0; font-size: 13px; transition: 0.15s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.06); }

.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  background: rgba(6, 9, 15, 0.75); backdrop-filter: blur(14px); z-index: 5;
}
.searchbox {
  flex: 1; max-width: 520px; position: relative;
}
.searchbox input {
  width: 100%; padding: 10px 14px 10px 38px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(4, 8, 14, 0.7);
  font-size: 13px; outline: none; transition: 0.18s;
}
.searchbox input:focus { border-color: rgba(91, 225, 255, 0.45); box-shadow: 0 0 0 3px rgba(91, 225, 255, 0.08); }
.searchbox .mag { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #4e5c6f; font-size: 13px; }
.searchbox kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 10px; color: #4e5c6f;
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px;
}
.topbar .grow { flex: 1; }

.content { flex: 1; overflow-y: auto; padding: 26px 26px 90px; scroll-behavior: smooth; }

.view-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.view-head h2 { margin: 0; font-size: 22px; font-weight: 300; letter-spacing: 0.02em; }
.view-head .count { font-family: var(--mono); font-size: 11px; color: #556375; letter-spacing: 0.1em; }
.view-head .desc { color: var(--dim); font-size: 12.5px; }

.section { margin-bottom: 34px; }
.section-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 13px;
  font-size: 12.5px; color: #a9b8cb; letter-spacing: 0.06em;
}
.section-head .c-dot { width: 6px; height: 6px; border-radius: 2px; box-shadow: 0 0 9px currentColor; }
.section-head .n { font-family: var(--mono); font-size: 10.5px; color: #4f5d70; }
.section-head .line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(140, 170, 210, 0.14), transparent); }

.grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
}

.card {
  position: relative; display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(17, 24, 36, 0.86), rgba(8, 12, 19, 0.86));
  transition: 0.18s cubic-bezier(0.2, 0.7, 0.3, 1); overflow: hidden; cursor: pointer;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 80% at 0% 0%, rgba(91, 225, 255, 0.1), transparent 55%);
  opacity: 0; transition: 0.25s;
}
.card:hover { transform: translateY(-2px); border-color: rgba(91, 225, 255, 0.32); box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(91, 225, 255, 0.06); }
.card:hover::after { opacity: 1; }
.card .fav {
  width: 34px; height: 34px; flex: none; border-radius: 9px; overflow: hidden;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line); font-size: 14px; color: #8fb6d6;
}
.card .fav img { width: 18px; height: 18px; object-fit: contain; }
.card .body { min-width: 0; flex: 1; }
.card .t {
  font-size: 13.5px; color: #e6eef8; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .h { font-family: var(--mono); font-size: 10.5px; color: #5a6a7e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.tag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.05em;
  padding: 2px 6px; border-radius: 5px; color: #7f93ab;
  border: 1px solid rgba(140, 170, 210, 0.14); background: rgba(140, 170, 210, 0.05);
}
.card .acts {
  position: absolute; top: 8px; right: 8px; display: flex; gap: 3px;
  padding: 3px; border-radius: 10px; background: rgba(5, 9, 15, 0.9);
  border: 1px solid rgba(140, 170, 210, 0.14);
  backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(-4px); transition: 0.16s;
}
.card:hover .acts { opacity: 1; transform: none; }
.acts button {
  width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  border: 1px solid var(--line); background: rgba(6, 10, 16, 0.9); color: #8b9ab0;
  cursor: pointer; font-size: 11px; transition: 0.14s;
}
.acts button:hover { color: #fff; border-color: var(--line-strong); }
.card.pinned { border-color: rgba(251, 191, 36, 0.28); }
.card.pinned .pin-mark { color: var(--amber); }

.empty {
  padding: 40px 20px; text-align: center; color: #556375; font-size: 13px;
  border: 1px dashed var(--line); border-radius: 14px;
}

/* 资料库 */
.note-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.note {
  border: 1px solid var(--line); border-radius: 14px; padding: 16px; cursor: pointer;
  background: linear-gradient(160deg, rgba(17, 24, 36, 0.8), rgba(8, 12, 19, 0.8));
  transition: 0.18s; position: relative;
}
.note:hover { border-color: rgba(167, 139, 250, 0.35); transform: translateY(-2px); }
.note h4 { margin: 0 0 8px; font-size: 14px; font-weight: 500; letter-spacing: 0.01em; }
.note pre {
  margin: 0; font-family: var(--mono); font-size: 11.5px; line-height: 1.8; color: #8fa0b5;
  white-space: pre-wrap; word-break: break-word; max-height: 150px; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
  mask-image: linear-gradient(180deg, #000 60%, transparent);
}
.note .ntags { display: flex; gap: 5px; margin-top: 10px; }

/* ============================== 弹层 ============================== */
.modal-wrap {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px;
  background: rgba(2, 4, 8, 0.72); backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none; transition: 0.18s;
}
.modal-wrap.show { opacity: 1; pointer-events: auto; }
.modal {
  width: min(520px, 100%); max-height: 88vh; overflow-y: auto;
  border-radius: 18px; border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #0e1622, #080c12);
  box-shadow: 0 40px 120px -40px #000; padding: 22px;
  transform: translateY(8px) scale(0.99); transition: 0.2s;
}
.modal-wrap.show .modal { transform: none; }
.modal h3 { margin: 0 0 4px; font-size: 16px; font-weight: 500; letter-spacing: 0.02em; }
.modal .sub { color: #6b7b8f; font-size: 12px; margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-group { margin-bottom: 12px; }
.form-group label {
  display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.15em;
  text-transform: uppercase; color: #5f6f83; margin-bottom: 7px;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(4, 8, 14, 0.75);
  font-size: 13px; outline: none; transition: 0.16s;
}
.form-group textarea { min-height: 110px; resize: vertical; font-family: var(--mono); font-size: 12px; line-height: 1.7; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: rgba(91, 225, 255, 0.45); box-shadow: 0 0 0 3px rgba(91, 225, 255, 0.08);
}
.form-group select option { background: #0b111a; }
.modal-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; align-items: center; }
.modal-acts .spacer { flex: 1; }

.hint { font-size: 11.5px; color: #64748b; line-height: 1.8; }
.hint code { font-family: var(--mono); color: #8fd8ea; background: rgba(91, 225, 255, 0.07); padding: 1px 5px; border-radius: 4px; }

/* 命令面板 */
.palette { width: min(560px, 100%); align-self: start; margin-top: 12vh; }
.palette input {
  width: 100%; padding: 14px 16px; font-size: 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: rgba(6, 10, 16, 0.95); outline: none;
}
.palette-list { margin-top: 8px; max-height: 46vh; overflow-y: auto; border-radius: 12px; }
.palette-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px;
  cursor: pointer; font-size: 13px; color: #b7c4d4;
}
.palette-item.sel, .palette-item:hover { background: rgba(91, 225, 255, 0.1); color: #fff; }
.palette-item .u { margin-left: auto; font-family: var(--mono); font-size: 10px; color: #526174; }

/* toast */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  padding: 9px 16px; border-radius: 10px; font-size: 12.5px;
  border: 1px solid var(--line-strong); background: rgba(10, 16, 24, 0.95);
  box-shadow: 0 20px 50px -25px #000; animation: rise 0.22s ease;
  color: #dbe6f2;
}
.toast.err { border-color: rgba(248, 113, 113, 0.4); color: #fca5a5; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 30;
  width: 48px; height: 48px; border-radius: 14px; border: none; cursor: pointer;
  background: linear-gradient(130deg, #7ce9ff, #9f8dff); color: #06111a;
  font-size: 22px; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 18px 40px -16px rgba(91, 225, 255, 0.8); transition: 0.18s;
}
.fab:hover { transform: translateY(-2px) rotate(90deg); }

@media (hover: none) {
  .card { padding-bottom: 40px; }
  .card .acts { opacity: 1; transform: none; top: auto; bottom: 8px; left: 10px; right: auto; }
  .card .acts button { background: rgba(140, 170, 210, 0.07); }
}

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 50;
    transform: translateX(-100%); transition: 0.22s; box-shadow: 30px 0 80px -30px #000;
  }
  .rail.open { transform: none; }
  .content { padding: 18px 16px 90px; }
  .topbar { padding: 12px 14px; }
  .fab { right: 16px; bottom: 18px; }
  .searchbox kbd { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .card { padding: 12px 12px 44px; }
  .view-head h2 { font-size: 19px; }
}

/* 手机端遮罩 */
.scrim {
  position: fixed; inset: 0; background: rgba(2, 4, 8, 0.6); z-index: 45;
  opacity: 0; pointer-events: none; transition: 0.2s;
}
.scrim.show { opacity: 1; pointer-events: auto; }
