* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #3b82f6;
  --primary-deep: #2563eb;
  --primary-light: #eff6ff;
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #14b8a6 50%, #ec4899 100%);
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --code-bg: #f1f5f9;
  --tag-bg: #e0f2fe;
  --tag-color: #0369a1;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', 'Consolas', monospace;
  --bottom-nav-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--bottom-nav-h);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.main-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  min-height: calc(100vh - var(--bottom-nav-h));
}

.site-footer {
  text-align: center;
  padding: 1rem;
  padding-bottom: calc(1rem + var(--bottom-nav-h));
  color: var(--text-muted);
  font-size: 12px;
  max-width: 640px;
  margin: 0 auto;
}

/* ── 底部导航 ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  user-select: none;
}

.bottom-nav-item svg { transition: transform 0.2s; }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active svg { transform: scale(1.1); }
.bottom-nav-item:hover { text-decoration: none; color: var(--primary); }

/* ── Pages ── */
.page { display: none; }
.page.active { display: block; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 5rem 0 3.5rem;
}

.hero-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2rem;
  letter-spacing: -1px;
  line-height: 1.35;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 2;
  margin-bottom: 2.5rem;
}

.hero-subtitle p {
  margin-bottom: 0.4rem;
}

.hero-subtitle p:last-child {
  margin-bottom: 0;
}

/* ── Hero 标签 ── */
.hero-tags {
  display: block;
  margin: 1.5rem auto 0;
  max-width: 460px;
  width: 100%;
}

.hero-tags .hero-tag + .hero-tag {
  margin-top: 12px;
}

.hero-tag {
  display: block;
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 12px;
  line-height: 1.5;
  text-align: left;
  width: 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* ── 首页服务入口 ── */
.home-services {
  max-width: 460px;
  margin: 3rem auto 0;
  width: 100%;
}

.home-services-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 10px;
  padding-left: 4px;
}

.home-services-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-transition: border-color 0.2s, -webkit-box-shadow 0.2s;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.home-services-card:hover {
  border-color: var(--primary);
  -webkit-box-shadow: 0 2px 10px rgba(59,130,246,0.08);
  box-shadow: 0 2px 10px rgba(59,130,246,0.08);
}

.home-services-card:active {
  border-color: var(--primary);
  background: var(--primary-light);
  -webkit-box-shadow: 0 1px 4px rgba(59,130,246,0.12);
  box-shadow: 0 1px 4px rgba(59,130,246,0.12);
}

.home-service-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 15px 20px;
}

.home-service-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  -ms-flex-negative: 0;
  flex-shrink: 0;
  margin-right: 12px;
}

.home-service-name {
  font-size: 14px;
  color: var(--text);
}

.home-service-divider {
  height: 1px;
  background: var(--border);
  margin-left: 39px;
}

/* ── 首页入口卡片 ── */
.nav-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.nav-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(59,130,246,0.1);
  transform: translateY(-1px);
  text-decoration: none;
}

.nav-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-card-body { flex: 1; min-width: 0; }
.nav-card-body h3 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.nav-card-body p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.nav-card-arrow { font-size: 18px; color: var(--text-muted); flex-shrink: 0; }

/* ── Page header ── */
.page-header { padding: 2.5rem 0 0.5rem; }
.page-title { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 0.5rem; }
.page-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

.gradient-line {
  width: 48px; height: 3px; border-radius: 3px;
  background: var(--primary-gradient);
  margin: 0.5rem 0 1.5rem;
}

/* ── Service list ── */
.service-list { display: flex; flex-direction: column; gap: 1rem; }

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.2s;
}

.service-card:hover { border-color: var(--primary); box-shadow: 0 4px 20px rgba(59,130,246,0.1); }
.service-card:hover::before { opacity: 1; }

.service-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.5rem;
}

.service-icon { font-size: 22px; line-height: 1; }

.service-card h4 { font-size: 17px; font-weight: 700; }

.service-card .service-desc {
  font-size: 14px; color: var(--text-muted); line-height: 1.7;
  margin-bottom: 1rem;
}

.service-features {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.service-features li {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  padding: 4px 0 4px 18px;
  position: relative;
}

.service-features li::before {
  content: '';
  position: absolute;
  left: 2px; top: 13px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.6;
}

.service-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  gap: 12px;
}

.service-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.price-symbol { font-size: 14px; color: var(--primary); font-weight: 600; }
.price-num { font-size: 24px; color: var(--primary); font-weight: 800; letter-spacing: -0.5px; }
.price-unit { font-size: 12px; color: var(--text-muted); margin-left: 4px; }

.service-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 18px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

.service-cta:hover {
  background: var(--primary-deep);
  text-decoration: none;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

/* ── Post card ── */
.post-grid { display: grid; gap: 0.75rem; }

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.post-card:hover { border-color: var(--primary); box-shadow: 0 4px 20px rgba(59,130,246,0.12); }

.post-card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 0.4rem; flex-wrap: wrap; }
.post-date { font-size: 12px; color: var(--text-muted); }

.post-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 0.4rem; line-height: 1.4; }

.post-card p {
  font-size: 13px; color: var(--text-muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.post-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.6rem; }
.read-time { font-size: 12px; color: var(--text-muted); }

/* ── Tag ── */
.tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--tag-bg);
  color: var(--tag-color);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.tag:hover { opacity: 0.75; }
.tag.active { background: var(--primary-gradient); color: #fff; }

.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.25rem; }

/* ── 联系页 ── */
.contact-bio-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #fdf4ff 100%);
  border: 1px solid #dbeafe;
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.contact-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #fff; font-weight: 700;
  margin: 0 auto 1rem;
}

.contact-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.contact-role { font-size: 13px; color: var(--primary); font-weight: 500; margin-bottom: 1rem; }

.contact-stats {
  display: flex; justify-content: center; gap: 2rem;
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid rgba(59,130,246,0.1);
}

.stat-item { text-align: center; }
.stat-num { font-size: 20px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.contact-bio-text {
  font-size: 14px; color: var(--text-muted); line-height: 1.8;
  text-align: left; margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid rgba(59,130,246,0.1);
}

.contact-bio-text p { margin-bottom: 0.75rem; }
.contact-bio-text p:last-child { margin-bottom: 0; }

.contact-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem;
}

.contact-card {
  display: flex; align-items: center; gap: 14px;
  padding: 1.1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.2s;
}

.contact-card:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(59,130,246,0.1); transform: translateY(-1px); }

.contact-card-icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
}

.wechat-icon { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); color: #2e7d32; }
.oa-icon { background: linear-gradient(135deg, #e3f2fd, #bbdefb); color: #1565c0; }

.contact-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.contact-card-label { font-size: 11px; color: var(--text-muted); letter-spacing: 0.5px; text-transform: uppercase; }
.contact-card-value { font-size: 14px; font-weight: 600; word-break: break-all; }

.contact-skills { margin-top: 1.5rem; }
.contact-skills-title { font-size: 14px; font-weight: 600; margin-bottom: 0.75rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag { padding: 4px 12px; background: var(--primary-light); color: var(--primary); border-radius: 20px; font-size: 13px; font-weight: 500; }

.contact-note {
  padding: 12px 16px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  font-size: 13px; color: #92400e;
  text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 1.5rem;
}

/* ── Search ── */
.search-bar {
  width: 100%; padding: 10px 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; background: var(--white); outline: none;
  margin-bottom: 1rem; transition: border-color 0.15s;
}
.search-bar:focus { border-color: var(--primary); }

.empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); font-size: 14px; }

/* ── Article detail ── */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--text-muted);
  padding: 6px 14px; border-radius: 8px;
  margin: 1.5rem 0; border: 1px solid var(--border);
  background: var(--white); cursor: pointer;
  transition: all 0.15s;
}
.back-btn:hover { color: var(--primary); border-color: var(--primary); text-decoration: none; }

.article-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.article-title { font-size: 1.6rem; font-weight: 700; line-height: 1.3; margin-bottom: 1rem; letter-spacing: -0.3px; }
.article-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }

/* ── Markdown ── */
.md-content { line-height: 1.8; }
.md-content h1,.md-content h2,.md-content h3,.md-content h4,.md-content h5,.md-content h6 { margin: 1.75em 0 0.75em; font-weight: 600; line-height: 1.3; }
.md-content h1 { font-size: 1.6em; }
.md-content h2 { font-size: 1.3em; border-bottom: 1px solid var(--border); padding-bottom: 0.4em; }
.md-content h3 { font-size: 1.1em; }
.md-content p { margin-bottom: 1em; }
.md-content ul,.md-content ol { margin: 0.75em 0 1em 1.5em; }
.md-content li { margin-bottom: 0.25em; }
.md-content code { font-family: var(--font-mono); font-size: 0.875em; background: var(--code-bg); padding: 2px 6px; border-radius: 4px; }
.md-content pre { background: #1e293b; border-radius: var(--radius); padding: 1.25rem; overflow-x: auto; margin: 1em 0; }
.md-content pre code { background: none; padding: 0; color: #93c5fd; font-size: 0.85em; }
.md-content blockquote { border-left: 4px solid var(--primary); padding: 0.5em 1em; margin: 1em 0; background: var(--primary-light); border-radius: 0 var(--radius) var(--radius) 0; color: var(--text-muted); }
.md-content img { max-width: 100%; border-radius: var(--radius); margin: 1em 0; }
.md-content table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 14px; }
.md-content th,.md-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.md-content th { background: var(--code-bg); font-weight: 600; }
.md-content hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
.md-content a { color: var(--primary); }

.toc { background: var(--primary-light); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 2rem; font-size: 13px; }
.toc-title { font-weight: 600; margin-bottom: 0.5rem; }
.toc ul { margin: 0; padding-left: 1rem; }
.toc li { margin: 4px 0; }

/* ── 响应式 ── */
/* ══ 专属空间页面 ══ */
#page-secret {
  background: linear-gradient(160deg, #fdf8f0 0%, #fef6f0 40%, #fdf0f8 100%);
  margin: 0 -1.25rem -2rem;
  padding: 0 1.25rem 3rem;
  min-height: calc(100vh - var(--bottom-nav-h));
}

@media (max-width: 480px) {
  #page-secret { margin: 0 -1rem -2rem; padding: 0 1rem 3rem; }
}

#page-secret .secret-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2rem 0 0.75rem;
}

#page-secret .page-title {
  font-size: 1.5rem;
  background: linear-gradient(135deg, #d97706, #e11d48, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#page-secret .gradient-line {
  background: linear-gradient(90deg, #d97706, #e11d48, #7c3aed);
  width: 48px;
  height: 3px;
  border-radius: 3px;
  margin: 0 0 1.5rem;
}

.secret-back {
  font-size: 13px;
  color: #92400e;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(146,64,14,0.15);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.secret-back:hover { background: rgba(255,255,255,0.95); }

/* 内容卡片 - 纸质感 */
.secret-content-card {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 16px;
  padding: 2rem;
  line-height: 2;
  font-size: 15px;
  color: #1c1917;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.03);
  min-height: 280px;
}

/* 专属空间内渲染内容的排版 */
.secret-content-card p {
  margin-bottom: 0.8em;
}

.secret-content-card p:last-child {
  margin-bottom: 0;
}

.secret-content-card strong {
  color: #92400e;
  font-weight: 600;
}

/* 编辑按钮 - 暖色系 */
.secret-edit-btn {
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  color: #92400e;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(146,64,14,0.15);
  border-radius: 8px;
  padding: 5px 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.secret-edit-btn:hover { background: rgba(255,255,255,0.95); border-color: #d97706; }

/* 编辑模式 */
#secret-editor {
  width: 100%;
  min-height: 400px;
  padding: 1.5rem;
  font-size: 15px;
  line-height: 2;
  font-family: var(--font);
  color: #1c1917;
  background: rgba(255,255,255,0.88);
  border: 1.5px solid rgba(217,119,6,0.25);
  border-radius: 16px;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#secret-editor:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217,119,6,0.1);
}

.secret-edit-actions {
  display: flex;
  gap: 10px;
  margin-top: 1rem;
  justify-content: flex-end;
}

.secret-save-btn {
  padding: 9px 28px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #d97706, #e11d48);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.secret-save-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.secret-save-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.secret-cancel-btn {
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #92400e;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(146,64,14,0.15);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.secret-cancel-btn:hover { background: rgba(255,255,255,0.95); }

/* ══ Token 弹窗 ══ */
.token-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.token-overlay.show { display: flex; }

.token-box {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem 2rem;
  width: 360px;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  animation: pwdIn 0.25s ease;
}

.token-icon { font-size: 2.2rem; margin-bottom: 0.75rem; }
.token-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }
.token-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.6; }

.token-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 11px 16px;
  font-size: 14px;
  font-family: var(--font-mono);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s;
  text-align: center;
  letter-spacing: 1px;
}

.token-input:focus { border-color: #d97706; }

.token-btn {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #d97706, #e11d48);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.token-btn:hover { opacity: 0.88; }

.token-cancel {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 9px 0;
  font-size: 13px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}

/* ══ 密码弹窗 ══ */
.pwd-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.pwd-overlay.show { display: -webkit-box; display: -ms-flexbox; display: flex; }

.pwd-box {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem 2rem;
  width: 320px;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  -webkit-animation: pwdIn 0.25s ease;
  animation: pwdIn 0.25s ease;
}

@-webkit-keyframes pwdIn {
  from { opacity: 0; -webkit-transform: translateY(16px); transform: translateY(16px); }
  to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}

@keyframes pwdIn {
  from { opacity: 0; -webkit-transform: translateY(16px); transform: translateY(16px); }
  to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}

.pwd-icon { font-size: 2.2rem; margin-bottom: 0.75rem; }
.pwd-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 1.25rem; }

.pwd-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 11px 16px;
  font-size: 15px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
  -webkit-transition: border-color 0.2s;
  transition: border-color 0.2s;
  text-align: center;
  letter-spacing: 3px;
}

.pwd-input:focus { border-color: var(--primary); }

.pwd-error {
  font-size: 12px;
  color: #ef4444;
  margin-top: 8px;
  display: none;
}

.pwd-error.show { display: block; }

.pwd-btn {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--primary-gradient);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  -webkit-transition: opacity 0.2s;
  transition: opacity 0.2s;
}

.pwd-btn:hover { opacity: 0.88; }

.pwd-cancel {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 9px 0;
  font-size: 13px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}

/* ═══ 专属空间·便签本 ═══ */
#page-secret {
  background: linear-gradient(160deg, #fdf8f0 0%, #fef6f0 40%, #fdf0f8 100%);
  margin: 0 -1.25rem -2rem;
  padding: 0 1.25rem 3rem;
  min-height: calc(100vh - var(--bottom-nav-h));
}

@media (max-width: 480px) {
  #page-secret { margin: 0 -1rem -2rem; padding: 0 1rem 3rem; }
}

#page-secret .secret-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2rem 0 0.75rem;
}
#page-secret .page-title {
  font-size: 1.5rem;
  background: linear-gradient(135deg, #d97706, #e11d48, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#page-secret .gradient-line {
  background: linear-gradient(90deg, #d97706, #e11d48, #7c3aed);
  width: 48px;
  height: 3px;
  border-radius: 3px;
  margin: 0 0 1.5rem;
}
.secret-header-spacer { flex: 1; }

/* 便签网格 */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 0.5rem 0 2rem;
}

/* 便签卡片 */
.note-card {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  position: relative;
  overflow: hidden;
}
.note-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border-color: rgba(217,119,6,0.2);
}
.note-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #d97706, #e11d48);
  border-radius: 14px 14px 0 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.note-card:hover::before { opacity: 1; }

.note-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #1c1917;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.note-card-preview {
  font-size: 13px;
  color: #78716c;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
  min-height: 2.4em;
}
.note-card-date {
  font-size: 11px;
  color: #a8a29e;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* 新建便签卡片 */
.note-card--add {
  border: 2px dashed rgba(217,119,6,0.25);
  background: rgba(255,255,255,0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  transition: border-color 0.15s, background 0.15s;
}
.note-card--add:hover {
  border-color: #d97706;
  background: rgba(255,255,255,0.7);
  transform: translateY(-2px);
}
.note-card-add-icon {
  font-size: 2rem;
  color: #d97706;
  opacity: 0.6;
  margin-bottom: 8px;
  transition: opacity 0.15s, transform 0.15s;
}
.note-card--add:hover .note-card-add-icon { opacity: 1; transform: scale(1.1); }
.note-card-add-text {
  font-size: 13px;
  color: #92400e;
  opacity: 0.6;
  font-weight: 500;
}
.note-card--add:hover .note-card-add-text { opacity: 1; }

/* 空状态 */
.notes-empty {
  text-align: center;
  color: #a8a29e;
  font-size: 14px;
  padding: 4rem 1rem;
  display: none;
}
.notes-empty.show { display: block; }

/* ═══ 便签编辑视图 ═══ */
#secret-note-edit {
  padding-top: 0.5rem;
}

.note-edit-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.75rem;
}

.note-edit-back {
  font-size: 13px;
  color: #92400e;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(146,64,14,0.15);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.note-edit-back:hover { background: rgba(255,255,255,0.95); }

.note-title-input {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #1c1917;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 8px;
  padding: 6px 10px;
  outline: none;
  font-family: var(--font);
  min-width: 0;
  transition: border-color 0.15s, background 0.15s;
}
.note-title-input:focus {
  border-color: rgba(217,119,6,0.3);
  background: rgba(255,255,255,0.5);
}

.note-edit-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.note-delete-btn {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #dc2626;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(220,38,38,0.15);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.note-delete-btn:hover { background: rgba(254,226,226,0.7); border-color: rgba(220,38,38,0.3); }

.note-edit-date {
  font-size: 11px;
  color: #a8a29e;
  font-family: 'SF Mono', 'Fira Code', monospace;
  margin-bottom: 1rem;
}

.note-content-input {
  width: 100%;
  min-height: 55vh;
  padding: 1.25rem;
  font-size: 15px;
  line-height: 2;
  font-family: var(--font);
  color: #1c1917;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.note-content-input:focus {
  border-color: rgba(217,119,6,0.3);
  box-shadow: 0 0 0 3px rgba(217,119,6,0.06);
}

/* Token 弹窗（保存便签时用） */
.token-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.token-overlay.show { display: flex; }

.token-box {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem 2rem;
  width: 360px;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  animation: pwdIn 0.25s ease;
}

.token-icon { font-size: 2.2rem; margin-bottom: 0.75rem; }
.token-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }
.token-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.6; }

.token-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 11px 16px;
  font-size: 14px;
  font-family: var(--font-mono);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s;
  text-align: center;
  letter-spacing: 1px;
}
.token-input:focus { border-color: #d97706; }

.token-btn {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #d97706, #e11d48);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.token-btn:hover { opacity: 0.88; }

.token-cancel {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 9px 0;
  font-size: 13px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}

@media (max-width: 480px) {
  .contact-cards { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero-subtitle { font-size: 15px; }
  .main-content { padding: 0 1rem 2rem; }
  .page-title { font-size: 1.5rem; }
  .notes-grid { grid-template-columns: 1fr; }
}

