:root {
  --bg: #faf7f7;
  --surface: #ffffff;
  --surface-muted: #f5eff0;
  --border: #eadfe1;
  --text: #221c1d;
  --muted: #6f6265;
  --accent: #ff2442;
  --accent-hover: #e01b36;
  --ok: #1b8a4b;
  --ok-bg: #ecf9f1;
  --warn-bg: #fff5e6;
  --warn-text: #8c4a00;
  --radius: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.mobile-frame {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 14px;
}

.top-inner {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

.mobile-workspace {
  padding-top: 14px;
  padding-bottom: 48px;
}

.wechat-banner {
  background: var(--warn-bg);
  color: var(--warn-text);
  border: 1px solid #ffd599;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 14px;
}

.status {
  min-height: 20px;
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
}
.status.ok { color: var(--ok); font-weight: 600; }
.status.error { color: #c62828; font-weight: 600; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

h1 { font-size: 20px; margin: 0 0 8px; }
h2 { font-size: 16px; margin: 0; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0; }

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

input, textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
}

button, .btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

button.primary, .btn-link.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
button.primary:active, .btn-link.primary:active { background: var(--accent-hover); }
button.done {
  background: var(--ok-bg);
  border-color: #a7e3be;
  color: var(--ok);
}
button:disabled { opacity: 0.5; cursor: not-allowed; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.space-filter button.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.note-card:active { transform: scale(0.99); }
.note-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.note-card-title { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.note-card-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-muted);
  color: var(--muted);
}
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fff0f2;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.copy {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 8px 0;
  font-size: 15px;
}
.topics {
  color: #1a56db;
  font-size: 14px;
  white-space: pre-wrap;
  margin: 6px 0 12px;
}

.inset {
  background: var(--surface-muted);
  padding: 10px;
  border-radius: 10px;
  margin: 10px 0;
}

.assets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 10px;
}

.save-location {
  background: var(--surface-muted);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}
.save-location summary { cursor: pointer; font-weight: 600; color: var(--text); }
.save-location p { margin: 6px 0 0; }

.asset-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
}
.asset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.asset-name {
  font-weight: 600;
  font-size: 14px;
  word-break: break-all;
}
.asset-size { font-size: 12px; color: var(--muted); white-space: nowrap; }
.asset-preview {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 8px;
  background: #111;
  display: block;
  margin-bottom: 10px;
}
.expired-tip {
  color: #b45309;
  background: #fef3c7;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
}
