#splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #F1EBDF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
  cursor: pointer;
  overflow: hidden;
}

#splash.fade-out {
  opacity: 0;
  pointer-events: none;
}

#splash svg {
  max-width: 420px;
  height: auto;
  pointer-events: none;
  opacity: 0;
  animation: inkIn 1.4s ease forwards;
}

.splash-title {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  opacity: 0;
  animation: inkIn 1.2s ease 0.8s forwards;
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

.splash-subtitle {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  opacity: 0;
  animation: inkIn 1.2s ease 1.1s forwards;
}

@keyframes inkIn {
  from { opacity: 0; transform: scale(0.92); filter: blur(3px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* 顶栏 */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  z-index: 30;
}

.topbar-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text);
  transition: background 0.2s;
}

.icon-btn:active {
  background: var(--border);
}

/* 侧边栏遮罩 */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 40;
}
#overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* 侧边栏 */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--card);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 50;
  padding: var(--space-5) var(--space-4);
  display: flex;
  flex-direction: column;
}

#sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  margin-bottom: var(--space-5);
}

.sidebar-header h2 {
  font-size: 1.5rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.sidebar-header p {
  font-size: 0.8rem;
  margin-top: var(--space-1);
}

.nav-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}

.nav-item:active {
  background: var(--bg);
}

.nav-item.active {
  background: var(--bg);
  color: var(--accent);
  font-weight: 500;
}

.nav-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-footer {
  display: flex;
  gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

/* 内容区 */
.content {
  padding-top: var(--topbar-h);
  min-height: 100vh;
}

.view {
  display: none;
  padding: var(--space-4);
  padding-bottom: calc(var(--space-4) + 80px);
  max-width: 640px;
  margin: 0 auto;
}

.view.active {
  display: block;
}

@media (min-width: 640px) {
  .view {
    padding: var(--space-6);
    padding-bottom: calc(var(--space-6) + 80px);
  }
}
