/* ============================================================
   EchoChat Rebuild · Layout Styles
   应用外壳/三栏布局/顶栏/底栏/Landing/Onboarding
   ============================================================ */

/* ---- 应用外壳 ---- */
.app-shell {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

/* ---- 左侧导航栏 ---- */
.nav-rail {
  width: var(--sidebar-width);
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3) 0;
  gap: var(--space-2);
  flex-shrink: 0;
  z-index: var(--z-sticky);
}
.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  overflow: hidden;
}
.nav-logo svg {
  width: 36px;
  height: 36px;
  display: block;
}
.nav-item {
  width: 56px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--color-text-tertiary);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
  position: relative;
}
.nav-item:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}
.nav-item-active {
  background: transparent;
  color: var(--color-text);
  font-weight: var(--weight-semibold);
}
.nav-item[data-nav="home"] .nav-item-label {
  font-weight: var(--weight-semibold);
}
.nav-item svg {
  width: 22px;
  height: 22px;
}
.nav-item-label {
  font-size: var(--font-label);
  font-weight: var(--weight-medium);
  letter-spacing: 0;
}
.chat-back-btn {
  display: none;
}
.character-detail-body {
  padding: var(--space-5);
}
.nav-spacer {
  flex: 1;
}

/* ---- 会话列表栏 ---- */
.list-pane {
  width: var(--list-width);
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.list-header {
  padding: var(--space-5) var(--space-4) var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.inbox-head {
  padding: var(--space-5) var(--space-4) var(--space-3);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  min-width: 0;
}
.inbox-lead {
  font-size: var(--font-caption);
  color: var(--color-text-secondary);
  margin-top: var(--space-1);
  line-height: 1.5;
  letter-spacing: 0;
}
.list-title {
  font-size: var(--font-title);
  font-weight: var(--weight-semibold);
  letter-spacing: 0;
  line-height: 1.3;
}
.list-search {
  padding: 4px var(--space-4) var(--space-3);
}
.search-wrap {
  position: relative;
}
.search-ic {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-tertiary);
  pointer-events: none;
  display: flex;
}
.search-ic svg {
  width: 18px;
  height: 18px;
}
.input-search {
  padding-left: 38px;
  min-height: 40px;
  background: var(--color-surface-2);
  border-color: transparent;
}
.list-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px 12px;
}

/* ---- 聊天主区域 ---- */
.chat-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--color-surface-chat, var(--color-bg));
}
.chat-header {
  height: var(--topbar-height);
  padding: 0 var(--space-3);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}
.chat-header-center {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  transition: background var(--dur-fast) var(--ease-out);
  flex: 1;
  min-width: 0;
}
.chat-header-center .avatar,
.chat-header-center .character-avatar {
  flex-shrink: 0;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-mint) 35%, transparent);
}
.chat-header-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.chat-header-center:hover {
  background: var(--color-surface-2);
}
.chat-header-name {
  font-size: 16px;
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.chat-header-status {
  font-size: var(--font-label);
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}
.chat-composing {
  color: var(--color-text-secondary);
  font-weight: var(--weight-regular);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chat-composing::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-primary) 55%, transparent);
  animation: composing-glow 1.8s var(--ease-out) infinite;
}
@keyframes composing-glow {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-primary) 50%, transparent); opacity: 0.85; }
  50% { box-shadow: 0 0 0 6px transparent; opacity: 1; }
}
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.conv-hint {
  width: 100%;
  padding: 6px var(--space-4);
  font-size: var(--font-label);
  color: var(--color-text-secondary);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-3) 0;
}
.msg-virt-pad {
  width: 100%;
  flex-shrink: 0;
  pointer-events: none;
}
.chat-header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.chat-header-days {
  font-size: var(--font-label);
  color: var(--color-text-tertiary);
}
.chat-empty {
  flex: 1;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8) var(--space-5);
}
.chat-empty-t {
  font-size: var(--font-section);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.chat-empty p {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 22em;
}
.chat-waiting .btn-primary {
  margin-top: var(--space-4);
}
.meet-identity {
  margin: 0 0 var(--space-2);
  max-width: 22em;
  font-size: var(--font-caption);
  color: var(--color-text-secondary);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.meet-hello {
  margin: 0 0 var(--space-3);
  max-width: 22em;
  padding: var(--space-3) var(--space-4);
  border: 0;
  border-left: 3px solid var(--color-mint);
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--font-body);
  font-style: normal;
  color: var(--color-text);
  line-height: 1.6;
  text-align: left;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.resume-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0 var(--space-3) var(--space-2);
  padding: var(--space-2) 0 var(--space-2) var(--space-3);
  border: 0;
  border-left: 2px solid var(--color-mint);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  max-width: calc(100% - 2 * var(--space-3));
}
.resume-card:hover,
.resume-card:focus-visible {
  border-color: var(--color-mint);
  background: color-mix(in srgb, var(--color-mint-soft) 55%, transparent);
}
.resume-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.resume-line {
  font-size: var(--font-caption);
  color: var(--color-text-secondary);
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}
.resume-line-gap,
.resume-line-rel {
  color: var(--color-text);
  font-weight: var(--weight-medium);
}
.chat-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  max-width: 22em;
}
.chat-starters .chip-btn {
  min-height: 36px;
  font-size: 13px;
}
.chat-input-area {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 12px var(--space-3);
  padding-bottom: calc(12px + var(--safe-bottom));
  flex-shrink: 0;
}
.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  background: var(--color-input, var(--color-surface-2));
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.chat-input-wrap:focus-within {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}
.chat-input-wrap.is-sending {
  border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border));
}
.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  max-height: 140px;
  min-height: 24px;
  padding: var(--space-2);
  font-size: var(--font-body);
  line-height: var(--line-normal);
}
.chat-input::placeholder {
  color: var(--color-text-tertiary);
}
.composer-count {
  margin-top: 8px;
  text-align: right;
  font-size: var(--font-caption);
  color: var(--color-text-tertiary);
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.composer-count.is-near {
  color: var(--color-text-secondary);
}
.composer-count.is-over {
  color: var(--color-danger);
  font-weight: 600;
}
.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-primary-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.chat-send-btn:hover:not(:disabled) {
  background: var(--color-primary-hover);
}
.chat-send-btn:active:not(:disabled) {
  transform: scale(0.94);
}
.chat-send-btn:disabled {
  background: var(--color-surface-3);
  color: var(--color-text-tertiary);
}
.chat-send-stop {
  background: var(--color-danger);
}

/* ---- 右侧资料面板 ---- */
.profile-pane {
  width: var(--profile-width);
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}
.profile-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.profile-header {
  padding: var(--space-6) var(--space-4) var(--space-4);
  text-align: left;
  border-bottom: none;
  position: relative;
}
.profile-close {
  position: absolute;
  top: 8px;
  right: 8px;
}
.profile-header .avatar-lg,
.profile-header .character-avatar-lg {
  margin: 0;
  flex-shrink: 0;
}
.companion-identity {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
  padding-right: 44px;
}
.companion-identity-copy {
  min-width: 0;
  flex: 1;
}
.profile-header .character-avatar {
  display: inline-flex;
}
.profile-name {
  font-size: 20px;
  font-weight: var(--weight-semibold);
  line-height: 1.35;
  margin-top: 2px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.chat-empty .character-avatar {
  margin-bottom: 16px;
}
.profile-status {
  font-size: var(--font-caption);
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
}
.profile-slot {
  margin: var(--space-3) 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}
.profile-slot span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  margin-bottom: 2px;
}
.profile-kicker {
  margin: var(--space-4) 0 var(--space-2);
  font-size: var(--font-micro);
  font-weight: var(--weight-semibold);
  color: var(--color-text-tertiary);
  letter-spacing: 0.04em;
  text-align: left;
}
.profile-header .profile-kicker {
  margin-top: var(--space-5);
}
.companion-home {
  background: var(--color-bg);
}
.companion-home .profile-lead {
  margin-top: var(--space-3);
  text-align: left;
  max-width: 36em;
  margin-left: 0;
  margin-right: 0;
}
.companion-home .profile-reunion {
  margin: var(--space-2) 0 0;
  text-align: left;
}
.companion-home .profile-section {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}
.companion-home .profile-kicker {
  margin-top: 0;
}
.companion-home .profile-peek {
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
}
.companion-home .profile-peek.is-static {
  cursor: default;
}
@media (hover: hover) and (pointer: fine) {
  .companion-home .profile-peek:hover {
    background: transparent;
  }
  .companion-home button.profile-peek:hover .profile-peek-line {
    color: var(--color-primary);
  }
}
.companion-home .profile-now .profile-peek-line:first-of-type {
  font-size: var(--font-section);
  font-weight: var(--weight-semibold);
  line-height: 1.35;
}
.companion-home .profile-together,
.companion-home .profile-you,
.companion-home .profile-world {
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
.companion-home .profile-relate {
  margin-top: var(--space-2);
  margin-bottom: var(--space-2);
}
.companion-home .profile-support .profile-rows,
.companion-home .profile-world .profile-rows {
  border-top: none;
  margin-top: var(--space-2);
}
.companion-home .profile-world .profile-row {
  padding-left: 0;
  padding-right: 0;
  border-bottom: none;
}
.companion-home .profile-actions {
  background: var(--color-bg);
  border-top: none;
}
button.profile-kicker-link {
  display: block;
  width: 100%;
  background: none;
  padding: 0;
  cursor: pointer;
}
.profile-lead {
  margin: 0;
  text-align: left;
  font-size: var(--font-body);
  line-height: 1.65;
  color: var(--color-text);
}
.profile-relate {
  margin: 0 var(--space-4) var(--space-4);
  padding: var(--space-2) 0 var(--space-2) var(--space-3);
  border: none;
  border-left: 2px solid var(--color-mint);
  border-radius: 0;
  background: transparent;
}
.profile-relate .profile-kicker {
  margin-top: 0;
}
.profile-together {
  padding-top: var(--space-2);
}
.profile-together .profile-row {
  margin-top: var(--space-2);
  padding-left: 0;
  padding-right: 0;
}
.profile-support .profile-rows {
  border-top: 1px solid var(--color-border);
}
.profile-section {
  padding: var(--space-4);
  border-bottom: none;
}
.profile-section-title {
  font-size: var(--font-label);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
  letter-spacing: 0;
}
button.profile-section-link {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  padding: 0;
}
.profile-section-content {
  font-size: var(--font-caption);
  color: var(--color-text);
  line-height: 1.7;
}
.profile-muted {
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.65;
}
.mem-line, .mom-line {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
  line-height: 1.55;
}
.mem-line:last-of-type, .mom-line:last-of-type {
  border-bottom: none;
}
.mom-line span {
  display: block;
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-top: 4px;
}
.profile-extract, .profile-tools {
  margin-top: var(--space-3);
}
.profile-tools {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.profile-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-4) + var(--safe-bottom, 0px));
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-elevated, var(--color-surface));
  flex-shrink: 0;
}
.profile-actions .btn-block {
  width: 100%;
}
.profile-section-peek .profile-section-content {
  padding-top: 0;
}
.profile-peek {
  width: 100%;
  text-align: left;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .profile-peek:hover {
    background: var(--color-primary-soft);
  }
}
.profile-peek-line {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text);
}
.profile-peek-line + .profile-peek-line {
  margin-top: var(--space-2);
}
.profile-peek-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-right: var(--space-2);
}
.profile-peek-empty {
  margin: 0;
}
.profile-rows {
  border-top: 1px solid var(--color-border);
}
.profile-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  text-align: left;
  padding: var(--space-4);
  min-height: 44px;
  border: none;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.profile-row:last-child {
  border-bottom: none;
}
@media (hover: hover) and (pointer: fine) {
  .profile-row:hover {
    background: var(--color-surface-2);
  }
}
.profile-row-copy {
  flex: 1;
  min-width: 0;
}
.profile-row-title {
  display: block;
  font-size: var(--font-body);
  font-weight: var(--weight-medium);
  line-height: 1.35;
  color: var(--color-text);
}
.profile-row-meta {
  display: block;
  font-size: var(--font-caption);
  color: var(--color-text-secondary);
  margin-top: 2px;
  line-height: 1.45;
}
.profile-row-arrow {
  color: var(--color-text-tertiary);
  flex-shrink: 0;
}
.sheet-section {
  padding-bottom: var(--space-5);
}
.sheet-section + .sheet-section {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-4);
}
.sheet-section-title {
  font-size: var(--font-label);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}
.sheet-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.sheet-section-head .sheet-section-title {
  margin-bottom: 0;
}
.moments-filter-inline {
  font-size: 13px;
  padding: 4px 8px;
  min-height: 32px;
}
.sheet-action {
  margin-top: var(--space-3);
}
.sheet-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.sheet-actions-row .sheet-action {
  margin-top: 0;
}
.continuity-journal {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.continuity-legend {
  display: none;
}
.continuity-legend-line {
  margin: 0 0 var(--space-4);
  font-size: var(--font-caption);
  color: var(--color-text-secondary);
  line-height: 1.65;
  max-width: 36em;
}
.continuity-legend-card {
  display: none;
}
.continuity-rel {
  margin: 0 0 var(--space-4);
}
.continuity-empty {
  margin: 0 0 var(--space-3);
}
.lived-journal {
  gap: var(--space-2);
}
.trace-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-2) var(--space-3);
  align-items: start;
  padding: var(--space-3);
  margin-bottom: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface) 90%, transparent);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  line-height: 1.55;
}
.trace-line-memory {
  border-left: 3px solid var(--color-primary);
}
.trace-line-moment {
  border-left: 3px solid var(--color-mint);
}
.trace-line:last-child {
  margin-bottom: 0;
}
.trace-line-context {
  grid-template-columns: 1fr;
  padding: var(--space-2) 0;
}
.trace-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  padding-top: 2px;
  white-space: nowrap;
}
.trace-body {
  color: var(--color-text);
  min-width: 0;
  word-break: break-word;
}
.trace-when {
  font-size: 12px;
  color: var(--color-text-tertiary);
  white-space: nowrap;
  padding-top: 2px;
}
.continuity-context {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}
.continuity-context-label {
  font-size: var(--font-label);
  font-weight: var(--weight-semibold);
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-2);
}
.relationship-brief-meta {
  margin: 0 0 4px;
}
.profile-fold {
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
.profile-fold > summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0;
}
.profile-fold > summary::-webkit-details-marker {
  display: none;
}
.profile-fold > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--color-text-tertiary);
  border-bottom: 1.5px solid var(--color-text-tertiary);
  transform: rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.profile-fold[open] > summary::after {
  transform: rotate(225deg);
  margin-top: 4px;
}
.profile-fold .profile-section-content {
  padding-top: 8px;
}
.profile-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.reply-pace-field {
  margin-top: 8px;
  min-width: 0;
}
.reply-pace-field .segmented {
  width: 100%;
}
.reply-pace-field .segmented-btn {
  min-height: 44px;
  padding: 10px 8px;
}
.field-hint {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.45;
}
.conv-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.conv-row {
  display: flex;
  gap: var(--space-2);
  align-items: stretch;
  margin: 0;
}
.conv-row .conv-item {
  flex: 1;
  margin: 0;
}
.conv-tools {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
}
.conv-tool {
  width: var(--control-min);
  height: var(--control-min);
  color: var(--color-text-tertiary);
}
.conv-tool:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}
.conv-tool-danger:hover {
  background: color-mix(in srgb, var(--color-danger) 12%, transparent);
  color: var(--color-danger);
}
.conv-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--space-3);
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin: 0;
  background: var(--color-surface);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.conv-item:hover {
  border-color: var(--color-primary);
}
.conv-item.on {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}
.conv-item-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.conv-item .n {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: var(--weight-semibold);
  font-size: var(--font-caption);
}
.conv-now {
  flex-shrink: 0;
  font-size: var(--font-micro);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  line-height: 1.4;
}
.conv-item .d {
  display: block;
  font-size: var(--font-label);
  color: var(--color-text-secondary);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conv-when {
  color: var(--color-text-tertiary);
}

/* ---- Landing 页 ---- */
.landing {
  flex: 1;
  overflow-y: auto;
  background: var(--color-bg);
}
.welcome-screen {
  max-width: 420px;
  margin: 0 auto;
  min-height: min(100%, 100dvh);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 56px;
  text-align: center;
}
.welcome-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  flex-shrink: 0;
}
.welcome-mark svg {
  width: 64px;
  height: 64px;
  display: block;
  border-radius: 16px;
}
.welcome-screen h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: 12px;
  line-height: 1.25;
}
.welcome-lead {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.welcome-sub {
  font-size: var(--font-caption);
  color: var(--color-text-tertiary);
  line-height: 1.5;
  margin: 0 0 16px;
  max-width: 22em;
}
.welcome-letter {
  font-size: var(--font-body);
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin: 0 0 12px;
  max-width: 20em;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
}
.welcome-letter.on {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.welcome-beats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  width: 100%;
  max-width: 22em;
  margin: 0 0 28px;
  opacity: 0;
  transform: translateY(8px);
  text-align: left;
}
.welcome-beats.on {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.welcome-beat {
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.welcome-beat strong {
  display: block;
  font-style: normal;
  font-size: var(--font-label);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  margin-bottom: 2px;
}
.welcome-beat span {
  display: block;
  font-size: var(--font-micro);
  color: var(--color-text-secondary);
  line-height: 1.4;
}
.welcome-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.welcome-cta {
  min-width: 200px;
  width: min(100%, 280px);
  border-radius: var(--radius-pill);
}
.welcome-actions .btn-ghost {
  width: min(100%, 280px);
  margin-top: 0;
}
.role-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.onboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.onboard-preview {
  padding: 16px;
  min-height: 72px;
}
.onboard-preview-label {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}
.role-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.role-card:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}
.role-card-name {
  font-size: 15px;
  font-weight: 600;
}
.role-card-tag {
  font-size: 12px;
  color: var(--color-text-secondary);
}

/* ---- Onboarding ---- */
.onboarding {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  overflow: hidden;
}
.onboarding-progress {
  height: 4px;
  background: var(--color-surface-2);
  flex-shrink: 0;
}
.onboarding-progress-bar {
  height: 100%;
  background: var(--color-primary);
  transition: width var(--motion);
}
.onboarding-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}
.onboarding-title {
  font-size: var(--font-title);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-2);
}
.onboarding-desc {
  font-size: var(--font-caption);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-5);
}
.onboarding-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  flex-shrink: 0;
  padding-bottom: calc(var(--space-4) + var(--safe-bottom));
}

/* ---- 动态页 ---- */
.moments-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  min-width: 0;
}
.moments-filter {
  width: auto;
  max-width: 42%;
  min-width: 0;
  padding: 8px 12px;
  min-height: 44px;
}
.moments-feed {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2) var(--space-4) var(--space-8);
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}
.moments-feed.moments-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
}
.moments-empty .empty-icon {
  background: var(--color-mint-soft);
  color: var(--color-success);
  border-radius: var(--radius-md);
}
.moment-day {
  position: relative;
  padding-left: var(--space-5);
  margin-bottom: var(--space-6);
}
.moment-day:last-child {
  margin-bottom: 0;
}
.moment-day::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 28px;
  bottom: 8px;
  width: 2px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-mint) 48%, var(--color-border));
}
.moment-day-label {
  margin: 0 0 var(--space-3);
  font-size: var(--font-label);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  letter-spacing: 0;
}
.moment-day-rail {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.moment-entry {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}
.moment-entry.lived-card {
  position: relative;
  padding: var(--space-4) 0;
  margin-bottom: 0;
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.moment-entry.lived-card::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-5) + 2px);
  top: 22px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-mint);
  box-shadow: 0 0 0 3px var(--color-bg);
}
.moment-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: 12px;
}
.moment-head-copy {
  flex: 1;
  min-width: 0;
}
.moment-who-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.moment-who {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: var(--weight-semibold);
  font-size: var(--font-caption);
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.moment-when {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-top: 2px;
}
.moment-src {
  color: var(--color-text-tertiary);
}
.moment-src-tag {
  flex-shrink: 0;
  font-size: var(--font-micro);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  background: var(--color-primary-soft);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  line-height: 1.4;
}
.moment-del {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.moment-del:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}
.moment-del svg {
  width: 16px;
  height: 16px;
}
.moment-content {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 12px;
}
.moment-actions {
  display: flex;
  gap: var(--space-3);
}
.moment-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-tertiary);
  min-height: 44px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
}
.moment-action:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}
.moment-action-liked {
  color: var(--color-danger);
}

/* ---- 我的/设置页 ---- */
.me-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  min-width: 0;
  overflow-y: auto;
}
.me-content {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  padding: var(--space-5);
}
.me-profile {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding: 0 0 var(--space-5);
  background: transparent;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--color-border);
}
.me-settings-group {
  margin-bottom: var(--space-5);
}
.me-settings-group-title {
  font-size: var(--font-label);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
  padding: 0 var(--space-2);
  letter-spacing: 0;
}
.me-settings-list {
  background: transparent;
  border-radius: 0;
  border: none;
  border-top: 1px solid var(--color-border);
  overflow: hidden;
}
.me-profile-copy { flex: 1; min-width: 0; }
.me-name { font-size: 18px; font-weight: 600; line-height: 1.35; }
.me-meta { font-size: 13px; color: var(--color-text-secondary); margin-top: var(--space-1); line-height: 1.45; }
.me-settings-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  text-align: left;
  padding: var(--space-4);
  min-height: 44px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
  border-bottom: 1px solid var(--color-border);
  background: transparent;
}
.me-settings-item:last-child {
  border-bottom: none;
}
@media (hover: hover) and (pointer: fine) {
  .me-settings-item:hover {
    background: var(--color-surface-2);
  }
}
.me-settings-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.me-settings-item-content {
  flex: 1;
  min-width: 0;
}
.me-settings-item-title {
  flex: 1;
  min-width: 0;
  font-size: var(--font-body);
  font-weight: var(--weight-medium);
  line-height: 1.35;
  text-align: left;
}
.me-settings-item-value {
  font-size: var(--font-caption);
  color: var(--color-text-secondary);
  line-height: 1.35;
  flex-shrink: 0;
  max-width: 42%;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.me-settings-item-desc {
  font-size: var(--font-caption);
  color: var(--color-text-secondary);
  margin-top: var(--space-1);
  line-height: 1.45;
}
.me-settings-item-arrow {
  color: var(--color-text-tertiary);
}

/* ---- 底部导航（移动端）---- */
.bottom-nav {
  display: none;
  height: calc(var(--bottom-nav-height) + var(--safe-bottom));
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-bottom: var(--safe-bottom);
  flex-shrink: 0;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--color-text-tertiary);
  font-size: var(--font-label);
  font-weight: 500;
  letter-spacing: 0;
  min-height: 44px;
  transition: color var(--dur-fast) var(--ease-out);
}
.bottom-nav-item-active {
  color: var(--color-text);
  font-weight: 600;
}
.bottom-nav-item[data-nav="home"] span {
  font-weight: var(--weight-semibold);
}
.bottom-nav-item svg {
  width: 22px;
  height: 22px;
}

/* ---- 提示条 ---- */
.notice-banner {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-caption);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-shrink: 0;
}
.notice-banner-close {
  cursor: pointer;
  opacity: 0.7;
}
.notice-banner-close:hover {
  opacity: 1;
}
