/* memoria · page-specific styles */

/* ---------- home ---------- */
.page-home .tabbar { position: relative; z-index: 4; }

/* ---------- chat ---------- */
.page-chat { background: var(--chat-bg); }
.chat-header {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 10px;
}
.chat-header .peer-name { font-size: 18px; font-family: var(--font-display); }
.chat-header .peer-status { font-size: 11.5px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.chat-header .peer-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-deep);
}

/* ---------- memory ---------- */
.memory-head { padding: 16px 16px 2px; flex: 0 0 auto; }
.memory-head .title-row { display: flex; align-items: center; }
.memory-head h1 { font-size: 26px; flex: 1; }
.memory-head .subtitle { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.memory-count {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px;
  font-size: 12px; color: var(--text-2);
  flex: 0 0 auto;
}
.memory-count .sort { display: inline-flex; align-items: center; gap: 3px; color: var(--text-2); font-size: 12px; }
.memory-count .sort svg { width: 13px; height: 13px; }
.memory-scroll { flex: 1; overflow-y: auto; }
.memory-foot {
  text-align: center; font-size: 12px; color: var(--text-2);
  padding: 6px 16px 20px;
}

/* ---------- terminal ---------- */
.term-head { padding: 16px 16px 4px; flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.term-head h1 { font-size: 22px; display: flex; align-items: center; gap: 8px; }
.term-head h1 .prompt-glyph { font-family: var(--font-mono); color: var(--accent-deep); font-size: 18px; }
.term-note {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--brown);
  background: color-mix(in srgb, var(--brown) 14%, var(--surface));
  padding: 5px 14px;
  border-radius: 4px;
  transform: rotate(1.5deg);
  box-shadow: var(--shadow);
}

/* ---------- diary / secret (night extras) ---------- */
.paper-page { flex: 1; overflow-y: auto; padding: 20px 18px 24px; }
.paper-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 22px 20px;
  position: relative;
}
.paper-card .tape { position: absolute; top: -9px; left: 50%; width: 64px; height: 18px; transform: translateX(-50%) rotate(-2deg); background: color-mix(in srgb, var(--accent) 36%, transparent); border-radius: 2px; }
.paper-card h2 { font-size: 18px; margin-bottom: 10px; }
.paper-card p { font-size: 14px; line-height: 1.9; white-space: pre-wrap; }
.paper-card .date-line { color: var(--text-2); font-size: 12px; margin-bottom: 8px; }
.secret-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px; text-align: center; }
.secret-wrap .lock { font-size: 44px; }
.secret-wrap p { color: var(--text-2); font-size: 14px; line-height: 1.9; }

/* ---------- settings ---------- */
.settings-scroll { flex: 1; overflow-y: auto; padding: 4px 16px 20px; }
.section-title {
  font-size: 13px; color: var(--text-2);
  margin: 18px 4px 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.model-current { display: flex; align-items: center; gap: 12px; padding: 14px 16px; width: 100%; text-align: left; }
.model-current .avatar { width: 46px; height: 46px; font-size: 19px; }
.model-current .name { font-size: 16px; font-family: var(--font-display); display: flex; align-items: center; gap: 8px; }
.badge {
  font-size: 10px; font-weight: 400;
  background: color-mix(in srgb, var(--accent) 22%, var(--surface));
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 1px 8px;
  font-family: var(--font-body);
}
.model-current .meta, .model-item .meta { font-size: 11.5px; color: var(--text-2); line-height: 1.6; }
.model-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.model-item:last-child { border-bottom: none; }
.model-item .m-icon {
  width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.model-item .m-main { flex: 1; }
.model-item .m-name { font-size: 15px; font-family: var(--font-display); }
.tip-card {
  margin-top: 18px;
  padding: 14px 16px;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.8;
}
.tip-card .tip-title { font-family: var(--font-display); color: var(--text); font-size: 13.5px; margin-bottom: 2px; }

/* settings edit */
.edit-scroll { flex: 1; overflow-y: auto; padding: 4px 16px 24px; }
.edit-section { padding: 6px 16px 14px; margin-bottom: 14px; }
.edit-section .sec-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0 4px;
}
.edit-section .sec-title { font-size: 14px; font-family: var(--font-display); }
.sec-note { font-size: 11.5px; color: var(--text-2); line-height: 1.7; margin-top: 8px; }
.kv-count { font-size: 11.5px; color: var(--text-2); margin: 4px 0 10px; }
.apikey-wrap { position: relative; }
.apikey-wrap .eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  color: var(--text-2); width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
}
.apikey-wrap .eye svg { width: 17px; height: 17px; }
