/* ── App Shell ── */
#app {
  display: flex;
  flex-direction: column;
  height: var(--app-height);
  min-height: var(--app-height);
  max-height: var(--app-height);
  overflow: hidden;
  padding-bottom: 0;
  background: transparent;
}


/* ── Header ── */
.app-header {
  flex-shrink: 0;
  padding: calc(var(--safe-top) + 12px) 20px 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--separator-soft);
  position: relative;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 13px;
  gap: 12px;
}
.space-title {
  min-width: 0;
  max-width: min(52vw, 220px);
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--text);
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -.035em;
  text-align: left;
}
.space-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-right { margin-left: auto; display: flex; flex-direction: row; align-items: center; gap: 4px; }
.greeting {
  display: block;
  font-size: 10px;
  color: var(--text3);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 600;
}
.header-date {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--text);
}
.icon-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--text3);
  transition: background var(--tr), color var(--tr);
}
.icon-btn:active { background: var(--material-field); color: var(--text); }
.icon-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
.icon-btn svg { width: 17px; height: 17px; }

.space-title:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* ── Pages ── */
.pages-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.page { position: absolute; inset: 0; min-height: 0; opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity var(--tr-fast) var(--ease-standard), transform var(--tr-tab) var(--ease-nav); }
.page.active { opacity: 1; pointer-events: auto; transform: translateY(0); }
/* Handoff to Motion for bottom-nav page switches — avoids fighting inline keyframes */
.pages-wrap.page-motion-active .page { transition: none !important; }
.scroll-area {
  flex: 1;
  min-height: 0;
  height: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--pad-page) + 24px);
}

/* ── Bottom Nav (notched top edge for FAB — icons/markup unchanged) ── */
.bottom-nav {
  /*
   * Cradle notch: circular arc segment concentric with the FAB (same R as 52px button in layout space).
   * Cubics blend flat bar top → arc endpoints so the strip reads as “holding up” the circle (参考图).
   */
  --bottom-nav-notch-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 88' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' d='M0 88 L0 30 C0 14 10 0 24 0 L154 0 C164 0 174 9 180 16 A 36 36 0 0 1 220 16 C226 9 236 0 246 0 L376 0 C390 0 400 14 400 30 L400 88 Z'/%3E%3C/svg%3E");
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  background: transparent;
  border: none;
  box-shadow: none;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 -10px 24px rgba(8, 9, 16, 0.10));
}

.bottom-nav::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #414250, #232433);
  -webkit-mask-image: var(--bottom-nav-notch-svg);
  mask-image: var(--bottom-nav-notch-svg);
  -webkit-mask-mode: alpha;
  mask-mode: alpha;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.bottom-nav > .nav-item {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; color: var(--text3); font-size: 10px; font-weight: 560; letter-spacing: .01em; padding-bottom: 8px; transition: color var(--tr-fast) var(--ease-standard); }
.nav-item svg { width: 19px; height: 19px; }
.nav-item.active { color: var(--accent); }
.nav-item[data-page]:focus-visible,
.fab-wrap:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
.fab-wrap {
  position: relative;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 7px;
}
.fab {
  width: 50px;
  height: 50px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 82%, #fff 18%), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Sit lower so more of the circle rests inside the cradle (matches reference “托举”). */
  margin-top: -34px;
  box-shadow: 0 1px 0 rgba(255,255,255,.28) inset, 0 8px 18px rgba(50, 45, 100, 0.16);
  transition: transform var(--tr);
}
.fab:active { transform: scale(.94); }
.fab .fab-icon-star { width: 20px; height: 20px; stroke: none; fill: var(--fab-icon); transition: transform .2s, opacity .2s; }
.fab .fab-icon-plus { width: 20px; height: 20px; stroke: var(--fab-icon); stroke-width: 2.25; transition: transform .2s, opacity .2s; }

/* ── Section Label ── */
.section-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--text2); margin-bottom: 8px; text-transform: none; }
