/* Shadow Coach Alpha — 极简风格:大量留白、白底、黑字、淡灰线条 */
:root {
  --ink: #111111;
  --ink-soft: #555555;
  --ink-faint: #999999;
  --line: #e6e6e6;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --accent: #111111;
  --radius: 10px;
  --font: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
}

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

html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

#app { height: 100%; }

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; }
a { color: inherit; }

/* ============ 通用 ============ */
.btn {
  display: inline-block;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  padding: 12px 32px;
  font-size: 15px;
  border-radius: 999px;
  transition: opacity .15s;
}
.btn:hover { opacity: .82; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.small { padding: 6px 16px; font-size: 13px; }
.btn.subtle { border-color: var(--line); background: #fff; color: var(--ink-soft); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.muted { color: var(--ink-faint); }

/* ============ 顶栏 ============ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.topbar .brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 16px; letter-spacing: .02em;
  cursor: pointer;
}
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--ink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.topbar nav { display: flex; gap: 8px; align-items: center; }
.navlink {
  border: none; background: none; color: var(--ink-soft);
  font-size: 14px; padding: 8px 14px; border-radius: 8px;
}
.navlink:hover { background: var(--bg-soft); color: var(--ink); }
.navlink.active { color: var(--ink); font-weight: 600; }

/* ============ Landing ============ */
.landing { min-height: calc(100% - 65px); display: flex; flex-direction: column; }
.hero {
  text-align: center;
  padding: 130px 24px 110px;
}
.hero .logo-mark.big { width: 56px; height: 56px; font-size: 24px; border-radius: 16px; margin: 0 auto 36px; display: flex; }
.hero h1 { font-size: 44px; font-weight: 700; letter-spacing: -0.01em; }
.hero .slogan {
  margin-top: 28px;
  font-size: 22px;
  line-height: 1.9;
  color: var(--ink-soft);
  font-weight: 300;
}
.hero .cta { margin-top: 48px; }
.hero .cta .btn { font-size: 17px; padding: 15px 44px; }

.divider { border: none; border-top: 1px solid var(--line); margin: 0 auto; width: min(920px, 84%); }

.how { padding: 90px 24px 100px; text-align: center; }
.how h2 { font-size: 15px; font-weight: 500; color: var(--ink-faint); letter-spacing: .25em; text-transform: uppercase; }
.cards {
  margin: 56px auto 0;
  display: flex; gap: 28px; justify-content: center; flex-wrap: wrap;
  max-width: 960px;
}
.card {
  flex: 1 1 240px; max-width: 300px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 44px 30px;
  text-align: center;
  background: #fff;
}
.card .num { font-size: 13px; color: var(--ink-faint); letter-spacing: .1em; }
.card h3 { margin-top: 14px; font-size: 22px; font-weight: 600; }
.card p { margin-top: 14px; font-size: 14px; line-height: 1.8; color: var(--ink-soft); }

.footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 34px 24px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
  line-height: 1.9;
}

/* ============ Chat ============ */
.chat-layout {
  display: flex;
  height: calc(100vh - 65px);
  background: #fff;
}
.chat-side {
  width: 264px; flex-shrink: 0;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  background: var(--bg-soft);
}
.chat-side .side-head { padding: 16px; }
.chat-side .side-head .btn { width: 100%; text-align: center; border-radius: 8px; }
.conv-list { flex: 1; overflow-y: auto; padding: 0 10px 16px; }
.conv-item {
  padding: 11px 12px; border-radius: 8px; font-size: 13.5px;
  color: var(--ink-soft); cursor: pointer; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.conv-item:hover { background: #f0f0f0; }
.conv-item.active { background: #eaeaea; color: var(--ink); font-weight: 500; }
.conv-item .conv-date { display: block; font-size: 11px; color: var(--ink-faint); margin-top: 2px; }

.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.state-bar {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  background: #fff;
}
.state-step {
  font-size: 11px; letter-spacing: .06em;
  color: #c4c4c4;
  padding: 3px 8px; border-radius: 999px;
  white-space: nowrap;
}
.state-step.done { color: var(--ink-faint); }
.state-step.current { background: var(--ink); color: #fff; font-weight: 600; }
.state-arrow { color: #ddd; font-size: 10px; }
.state-bar .engine-tag { margin-left: auto; font-size: 11px; color: var(--ink-faint); white-space: nowrap; padding-left: 12px; }

.msg-scroll { flex: 1; overflow-y: auto; padding: 30px 0; }
.msg-inner { max-width: 720px; margin: 0 auto; padding: 0 24px; display: flex; flex-direction: column; gap: 22px; }

.msg { display: flex; gap: 12px; }
.msg .avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--line);
}
.msg.coach .avatar { background: var(--ink); color: #fff; border-color: var(--ink); }
.msg.user .avatar { background: #fff; color: var(--ink-soft); }
.msg .bubble { font-size: 15px; line-height: 1.85; padding-top: 3px; white-space: pre-wrap; word-break: break-word; }
.msg.user .bubble { color: var(--ink-soft); }

.msg.typing .bubble { color: var(--ink-faint); }

.reflection-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  background: var(--bg-soft);
  margin-top: 4px;
}
.reflection-card h4 { font-size: 13px; letter-spacing: .18em; color: var(--ink-faint); text-transform: uppercase; }
.reflection-card .rf-row { margin-top: 16px; }
.reflection-card .rf-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--ink-soft); text-transform: uppercase; }
.reflection-card .rf-text { margin-top: 5px; font-size: 14.5px; line-height: 1.8; white-space: pre-wrap; }

.chat-input-zone { border-top: 1px solid var(--line); padding: 16px 24px 20px; background: #fff; }
.chat-input-row {
  max-width: 720px; margin: 0 auto;
  display: flex; gap: 10px; align-items: flex-end;
}
.chat-input-row textarea {
  flex: 1; resize: none;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px; font-size: 15px; line-height: 1.6;
  max-height: 140px; outline: none;
}
.chat-input-row textarea:focus { border-color: #bbb; }
.chat-actions { max-width: 720px; margin: 10px auto 0; display: flex; justify-content: space-between; align-items: center; }
.chat-actions .hint { font-size: 12px; color: var(--ink-faint); }

.empty-chat {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink-faint); gap: 18px; text-align: center; padding: 24px;
}
.empty-chat .logo-mark { width: 44px; height: 44px; font-size: 18px; border-radius: 12px; }
.empty-chat p { font-size: 14px; line-height: 1.9; }

/* ============ Profile ============ */
.profile-wrap { max-width: 860px; margin: 0 auto; padding: 48px 24px 80px; }
.profile-head { display: flex; align-items: center; gap: 18px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.profile-head .avatar-big {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600;
}
.profile-head h2 { font-size: 24px; }
.profile-head .muted { font-size: 13.5px; margin-top: 4px; }

.section-title { margin-top: 44px; font-size: 13px; letter-spacing: .22em; color: var(--ink-faint); text-transform: uppercase; }

.mem-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.mem-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; background: #fff; }
.mem-card h4 { font-size: 12.5px; letter-spacing: .1em; color: var(--ink-soft); text-transform: uppercase; }
.mem-card ul { margin-top: 12px; list-style: none; }
.mem-card li { font-size: 14px; line-height: 1.7; padding: 5px 0; border-bottom: 1px dashed #f0f0f0; display: flex; justify-content: space-between; gap: 10px; }
.mem-card li:last-child { border-bottom: none; }
.mem-card .conf { font-size: 11px; color: var(--ink-faint); white-space: nowrap; align-self: center; }
.mem-empty { color: var(--ink-faint); font-size: 14px; margin-top: 18px; line-height: 1.8; }

.rf-list { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.28);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal {
  background: #fff; border-radius: 14px; width: min(440px, 92vw);
  padding: 34px 34px 28px;
  box-shadow: 0 18px 60px rgba(0,0,0,.16);
}
.modal h3 { font-size: 20px; }
.modal .sub { margin-top: 8px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; }
.modal .field { margin-top: 18px; }
.modal label { display: block; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 7px; }
.modal input, .modal select {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; outline: none;
}
.modal input:focus { border-color: #bbb; }
.modal .modal-actions { margin-top: 26px; display: flex; gap: 10px; justify-content: flex-end; }
.modal .err { color: #c0392b; font-size: 12.5px; margin-top: 10px; }
.modal .row2 { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13.5px; color: var(--ink-soft); }

.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 13.5px;
  padding: 10px 22px; border-radius: 999px; z-index: 99;
  animation: fadein .2s;
}
@keyframes fadein { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 720px) {
  .topbar { padding: 14px 18px; }
  .hero { padding: 80px 20px 70px; }
  .hero h1 { font-size: 32px; }
  .chat-side { display: none; }
}
