:root {
  --ink: #18383b;
  --muted: #6c7d7d;
  --deep: #315f65;
  --deep-2: #254d52;
  --sage: #73968d;
  --mint: #dcebe5;
  --mist: #f2f6f3;
  --cream: #fbfaf5;
  --warm: #e7b98a;
  --white: #fff;
  --line: #dfe8e3;
  --danger: #a14f4f;
  --shadow: 0 18px 50px rgba(34, 75, 73, .1);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--mist);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--mist); color: var(--ink); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand > span:last-child { display: grid; line-height: 1; gap: 4px; }
.brand b { font-family: Georgia, "Times New Roman", serif; font-size: 21px; letter-spacing: -.4px; }
.brand small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.brand-symbol { position: relative; display: inline-flex; width: 39px; height: 39px; align-items: center; justify-content: center; border-radius: 50%; background: var(--deep); overflow: hidden; }
.brand-symbol i { position: absolute; display: block; width: 23px; height: 8px; border: 2px solid #dcebe5; border-color: #dcebe5 transparent transparent; border-radius: 50%; transform: rotate(-7deg); }
.brand-symbol i:nth-child(1) { top: 10px; left: 8px; }
.brand-symbol i:nth-child(2) { top: 16px; left: 9px; width: 19px; opacity: .8; }
.brand-symbol i:nth-child(3) { top: 23px; left: 13px; width: 12px; opacity: .55; }

.button { min-height: 46px; border: 1px solid transparent; border-radius: 999px; padding: 0 21px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-weight: 750; transition: transform .18s, box-shadow .18s, background .18s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
.button-primary { background: var(--deep); color: white; box-shadow: 0 9px 22px rgba(49, 95, 101, .2); }
.button-primary:hover { background: var(--deep-2); }
.button-quiet { border-color: var(--line); background: rgba(255, 255, 255, .72); }
.button-small { min-height: 38px; padding: 0 16px; font-size: 13px; }
.button-full { width: 100%; }
.text-button { border: 0; background: transparent; cursor: pointer; font-weight: 800; }
.language-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.86); }
.language-switch button { min-width: 38px; height: 30px; padding: 0 10px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 850; }
.language-switch button.active { color: #fff; background: var(--deep); box-shadow: 0 4px 12px rgba(49,95,101,.2); }
.eyebrow { margin: 0 0 16px; color: var(--sage); font-size: 11px; font-weight: 850; letter-spacing: .18em; }
.muted { color: var(--muted); }

/* Landing */
.landing { background: var(--cream); }
.landing-header { height: 82px; max-width: 1240px; margin: auto; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; }
.landing-actions { display: flex; align-items: center; gap: 18px; }
.landing-hero { min-height: 670px; max-width: 1240px; margin: auto; padding: 76px 34px 90px; display: grid; grid-template-columns: 1.04fr .96fr; gap: 70px; align-items: center; }
.hero-copy h1 { max-width: 680px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 5.4vw, 77px); font-weight: 500; line-height: 1.04; letter-spacing: -.045em; }
.hero-lead { max-width: 620px; margin: 27px 0 0; color: #586c6c; font-size: 18px; line-height: 1.75; }
.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { max-width: 550px; margin: 20px 0 0; color: #81908d; font-size: 13px; line-height: 1.55; }
.hero-art { position: relative; min-height: 500px; border-radius: 48% 48% 35% 50% / 42% 55% 42% 55%; background: linear-gradient(145deg, #dbece6, #aec9c1); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.hero-art::before, .hero-art::after { content: ""; position: absolute; left: -8%; right: -8%; height: 130px; border: 2px solid rgba(255,255,255,.46); border-color: rgba(255,255,255,.46) transparent transparent; border-radius: 50%; }
.hero-art::before { bottom: 70px; transform: rotate(-5deg); }
.hero-art::after { bottom: 24px; transform: rotate(3deg); }
.sun-disc { position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(250, 239, 210, .58); top: 70px; right: 54px; }
.quiet-card { position: absolute; z-index: 2; left: 48px; right: 48px; bottom: 62px; padding: 28px; border: 1px solid rgba(255,255,255,.72); border-radius: 24px; background: rgba(255,255,255,.83); backdrop-filter: blur(12px); box-shadow: var(--shadow); }
.quiet-avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--deep); color: white; font-family: Georgia, serif; font-size: 21px; }
.quiet-card p { margin: 17px 0; font-family: Georgia, serif; font-size: 20px; line-height: 1.45; }
.quiet-lines { display: grid; gap: 7px; }
.quiet-lines i { height: 4px; width: 100%; border-radius: 4px; background: #d6e1dd; }
.quiet-lines i:nth-child(2) { width: 86%; }
.quiet-lines i:nth-child(3) { width: 61%; }
.leaf { position: absolute; width: 80px; height: 150px; border: 3px solid rgba(49,95,101,.22); border-radius: 100% 0 100% 0; }
.leaf-one { left: 28px; top: 50px; transform: rotate(-22deg); }
.leaf-two { left: 106px; top: 14px; width: 58px; height: 110px; transform: rotate(24deg); }
.landing-section { padding: 105px max(34px, calc((100vw - 1172px) / 2)); background: white; }
.section-heading { max-width: 650px; margin-bottom: 55px; }
.section-heading h2, .landing-split h2, .landing-cta h2, .crisis-panel h2 { margin: 0; font-family: Georgia, serif; font-weight: 500; letter-spacing: -.025em; }
.section-heading h2, .landing-split h2 { font-size: clamp(34px, 4vw, 51px); line-height: 1.13; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.trust-grid article { min-height: 255px; padding: 30px; border-radius: 22px; background: var(--mist); border: 1px solid #e7eeea; }
.trust-grid article > span { color: var(--warm); font-family: Georgia, serif; font-size: 15px; }
.trust-grid h3 { margin: 48px 0 12px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.trust-grid p, .space-list p { margin: 0; color: var(--muted); line-height: 1.7; }
.landing-split { max-width: 1172px; margin: auto; padding: 115px 0; display: grid; grid-template-columns: .9fr 1.1fr; gap: 100px; align-items: start; }
.space-list { display: grid; }
.space-list > div { padding: 28px 0; border-top: 1px solid var(--line); }
.space-list > div:last-child { border-bottom: 1px solid var(--line); }
.space-list strong { display: block; margin-bottom: 8px; font-size: 18px; }
.crisis-panel { max-width: 1172px; margin: 0 auto 110px; padding: 34px 40px; display: flex; gap: 24px; align-items: flex-start; border: 1px solid #ead8c6; border-radius: 22px; background: #fbf4eb; }
.crisis-mark { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #9b6b42; color: white; font-weight: 900; }
.crisis-panel h2 { font-size: 23px; }
.crisis-panel p { margin: 9px 0 0; color: #786653; line-height: 1.65; }
.landing-cta { padding: 100px 30px; text-align: center; background: #dcebe5; }
.landing-cta h2 { max-width: 700px; margin: 0 auto 30px; font-size: clamp(36px, 4vw, 54px); }
.landing-footer { min-height: 190px; padding: 55px max(34px, calc((100vw - 1172px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 30px; background: var(--deep-2); color: white; }
.brand-light small, .landing-footer p { color: #b9ceca; }
.landing-footer p { margin: 0; text-align: right; }

/* App chrome */
.app-shell { min-height: 100vh; padding-top: 76px; }
.app-header { position: fixed; z-index: 30; inset: 0 0 auto; height: 76px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; background: rgba(251, 250, 245, .92); border-bottom: 1px solid rgba(214,226,220,.85); backdrop-filter: blur(18px); }
.desktop-nav { margin: 0 auto; display: flex; gap: 7px; }
.desktop-nav a { min-height: 42px; padding: 0 16px; display: flex; align-items: center; gap: 8px; border-radius: 99px; color: var(--muted); font-size: 13px; font-weight: 750; }
.desktop-nav a.active { color: var(--deep); background: var(--mint); }
.header-actions { display: flex; align-items: center; gap: 9px; }
.avatar-button { width: 39px; height: 39px; padding: 0; display: grid; place-items: center; overflow: hidden; border: 0; border-radius: 50%; background: var(--deep); color: white; cursor: pointer; font-weight: 850; }
.avatar-button img { width: 100%; height: 100%; display: block; object-fit: cover; }
.icon-button { position: relative; width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.86); color: var(--deep); cursor: pointer; }
.icon-button svg { width: 19px; height: 19px; }
.icon-button:hover { background: var(--mint); }
.nav-badge { min-width: 17px; height: 17px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--danger); color: white; font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-weight: 800; line-height: 1; }
.icon-button .nav-badge { position: absolute; top: -3px; right: -3px; border: 2px solid var(--cream); height: 19px; }
.desktop-nav .nav-badge { margin-left: 2px; }
.notification-wrap { position: relative; }
.notification-panel { position: absolute; z-index: 40; top: calc(100% + 10px); right: 0; width: min(340px, calc(100vw - 32px)); max-height: 420px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 17px; background: var(--white); box-shadow: 0 22px 50px rgba(24,56,59,.16); overflow: hidden; }
.notification-panel-head { padding: 14px 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.notification-panel-head strong { font-family: Georgia, serif; font-weight: 500; font-size: 15px; }
.notification-panel-head button { padding: 0; border: 0; background: transparent; color: var(--deep); cursor: pointer; font-size: 12px; font-weight: 750; }
.notification-list { overflow-y: auto; }
.notification-item { width: 100%; padding: 13px 17px; display: flex; gap: 10px; align-items: flex-start; border: 0; border-bottom: 1px solid var(--mist); background: transparent; color: inherit; cursor: pointer; text-align: left; }
.notification-item:last-child { border-bottom: 0; }
.notification-item:hover { background: var(--mist); }
.notification-item strong { display: block; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: 700; line-height: 1.45; }
.notification-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.notification-item time { display: block; margin-top: 4px; color: var(--sage); font-size: 11px; }
.notification-dot { width: 7px; height: 7px; margin-top: 6px; flex: none; border-radius: 50%; background: transparent; }
.notification-item.is-unread .notification-dot { background: var(--deep); }
.notification-empty { padding: 34px 20px; color: var(--muted); font-size: 13px; text-align: center; }
.nav-icon { width: 19px; height: 19px; display: block; background-position: center; background-repeat: no-repeat; background-size: contain; opacity: .84; }
.nav-icon[data-icon="people"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23315f65' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Ccircle cx='17' cy='9' r='2.4'/%3E%3Cpath d='M3.5 19c.7-3.2 2.7-5.2 5.5-5.2s4.8 2 5.5 5.2M14.5 18.5c.4-1.8 1.5-3.1 3.3-3.5'/%3E%3C/svg%3E"); }
.nav-icon[data-icon="discuss"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23315f65' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3h11A2.5 2.5 0 0 1 20 5.5v8a2.5 2.5 0 0 1-2.5 2.5H10l-5 4v-4.5A2.5 2.5 0 0 1 4 13.5Z'/%3E%3C/svg%3E"); }
.nav-icon[data-icon="person"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23315f65' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='3.4'/%3E%3Cpath d='M5 20c.8-4 3.2-6.2 7-6.2s6.2 2.2 7 6.2'/%3E%3C/svg%3E"); }
.app-main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 100px; }
.mobile-nav { display: none; }
.page-head { margin-bottom: 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-head h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(32px, 4vw, 48px); font-weight: 500; letter-spacing: -.03em; }
.page-head p { max-width: 620px; margin: 9px 0 0; color: var(--muted); line-height: 1.6; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 26px; align-items: start; }
.side-note { position: sticky; top: 104px; padding: 24px; border-radius: 20px; background: #e5efea; }
.side-note h3 { margin: 0 0 10px; font-family: Georgia, serif; font-size: 21px; font-weight: 500; }
.side-note p { margin: 0; color: #58706e; font-size: 13px; line-height: 1.65; }
.counselor-filters { margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip { border: 1px solid var(--line); border-radius: 99px; padding: 9px 15px; background: white; cursor: pointer; font-size: 13px; font-weight: 700; }
.filter-chip.active { color: white; border-color: var(--deep); background: var(--deep); }
.counselor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.counselor-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 8px 30px rgba(36, 74, 72, .045); }
.counselor-top { display: flex; gap: 15px; align-items: center; }
.avatar { flex: none; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #c5ded5, #8bb0a4); color: white; overflow: hidden; font-family: Georgia, serif; font-size: 23px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.small { width: 42px; height: 42px; font-size: 17px; }
.avatar.large { width: 82px; height: 82px; font-size: 30px; }
/* 「我的」页可点击更换的头像 */
.avatar-picker { position: relative; flex: none; display: inline-block; line-height: 0; cursor: pointer; }
.avatar-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.avatar-picker-badge {
  position: absolute; right: -2px; bottom: -2px; width: 27px; height: 27px;
  display: grid; place-items: center; border: 2px solid white; border-radius: 50%;
  background: var(--deep); color: white; font-size: 13px; line-height: 1;
}
.avatar-picker-link {
  margin-top: 9px; padding: 0; border: 0; background: none;
  color: var(--sage); font: inherit; font-size: 12px; font-weight: 750;
  text-decoration: underline; cursor: pointer;
}
.avatar-picker-link:hover { color: var(--deep); }
.counselor-card h2, .post-card h2 { margin: 0; font-size: 18px; }
.counselor-title { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.level-badge { width: fit-content; margin-top: 8px; padding: 5px 9px; border-radius: 99px; font-size: 10px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.level-junior { color: #3f6e66; background: #e1efea; }
.level-intermediate { color: #6b5c2d; background: #f2e8c9; }
.level-senior { color: #684d72; background: #eadfee; }
.counselor-bio { min-height: 66px; margin: 18px 0 14px; color: #637372; font-size: 13px; line-height: 1.65; }
.tag-list { min-height: 29px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 5px 9px; border-radius: 8px; background: var(--mist); color: #5e706d; font-size: 11px; }
.card-actions { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.language-list { color: var(--muted); font-size: 11px; }

/* Discussion */
.composer, .post-card, .profile-card, .conversation-card { border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.composer { padding: 20px; margin-bottom: 17px; }
.composer textarea { width: 100%; min-height: 94px; resize: vertical; border: 0; outline: 0; color: var(--ink); background: transparent; line-height: 1.6; }
.composer-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.composer-footer small { color: var(--muted); }
.composer-actions { display: flex; align-items: center; gap: 8px; }
.file-button { position: relative; overflow: hidden; cursor: pointer; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
/* 选完图片后的缩略图反馈：原来选完没有任何提示，用户会以为没选上 */
.image-preview { margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px; }
/* display:flex 会盖掉 hidden 属性自带的 display:none，必须显式补回来 */
.image-preview[hidden] { display: none; }
/* 占满输入区的第一行，让下面的「添加图片 / 输入框 / 发送」换到第二行 */
.compose-preview { flex: 0 0 100%; margin: 0 0 2px; }
.image-chip { position: relative; display: inline-block; line-height: 0; }
.image-chip img {
  width: 78px; height: 78px; display: block;
  border: 1px solid var(--line); border-radius: 13px; object-fit: cover; background: #f1f4f3;
}
.image-chip-remove {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; padding: 0;
  display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%;
  background: white; color: #55706c; font-size: 15px; line-height: 1; cursor: pointer;
}
.image-chip-remove:hover { color: #b4453f; }
.load-more { display: block; margin: 18px auto 0; }
.feed { display: grid; gap: 15px; }
.post-card { padding: 22px; }
.post-author { display: flex; align-items: center; gap: 11px; }
.post-author-meta { display: grid; gap: 3px; }
.post-author-meta span { color: var(--muted); font-size: 11px; }
.post-content { margin: 17px 0; white-space: pre-wrap; line-height: 1.7; overflow-wrap: anywhere; }
.post-media { width: 100%; max-height: 520px; margin: 0 0 17px; display: block; border-radius: 15px; object-fit: cover; }
.post-actions { padding-top: 13px; display: flex; gap: 10px; border-top: 1px solid #edf1ef; }
.action-button { border: 0; border-radius: 99px; padding: 8px 12px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; font-size: 12px; }
.action-button:hover, .action-button.active { color: var(--deep); background: var(--mint); }
.comments { margin-top: 12px; display: grid; gap: 10px; }
.comment { padding: 11px 13px; border-radius: 14px; background: var(--mist); font-size: 13px; line-height: 1.5; }
.comment b { margin-right: 5px; }
.comment-form { margin-top: 12px; display: flex; gap: 8px; }
.comment-form input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 99px; padding: 0 14px; outline: 0; }
.comment-form input:focus, .field input:focus, .profile-form textarea:focus, .message-compose textarea:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(115,150,141,.12); }

/* Chat */
.chat-page { max-width: 900px; margin: 0 auto; }
.chat-header { margin-bottom: 14px; padding: 18px 20px; display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 20px; background: white; }
.back-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: white; cursor: pointer; font-size: 21px; }
.chat-person { display: flex; align-items: center; gap: 10px; }
.chat-person h1 { margin: 0; font-size: 16px; }
.chat-person p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
/*
 * 聊天区是一个定高的 flex 列：卡片自己吃掉一屏，消息列表用 flex:1 + min-height:0
 * 让它在卡片内部滚动。原来卡片只写 min-height、列表另写一个 max-height，两个数字
 * 要人工对齐，移动端把 max-height 去掉之后列表就再也不滚了，整页被消息越拉越长。
 */
.conversation-card { height: calc(100vh - 250px); min-height: 420px; display: flex; flex-direction: column; overflow: hidden; }
.message-list { flex: 1; min-height: 0; padding: 25px; display: flex; flex-direction: column; gap: 13px; overflow-y: auto; overscroll-behavior: contain; background: linear-gradient(#fbfcfa, #f4f8f5); }
.message-list::-webkit-scrollbar { width: 7px; }
.message-list::-webkit-scrollbar-thumb { border-radius: 99px; background: rgba(49,95,101,.22); }
.message-list::-webkit-scrollbar-thumb:hover { background: rgba(49,95,101,.36); }
.message-list::-webkit-scrollbar-track { background: transparent; }
.message-list { scrollbar-width: thin; scrollbar-color: rgba(49,95,101,.28) transparent; }
/* 手机浏览器的 100vh 不含地址栏收起后的变化，会把输入框顶到可视区外面 */
@supports (height: 100dvh) {
  .conversation-card { height: calc(100dvh - 250px); }
}
/* 不写 align-self 时会被列 flex 拉伸到整个 max-width，一句「hi」也占满一条，
   只有 .mine 因为写了 flex-end 才贴合内容，两边看起来完全不对称 */
.message { max-width: min(70%, 570px); align-self: flex-start; }
.message.mine { align-self: flex-end; }
.message-bubble { padding: 12px 15px; border-radius: 17px 17px 17px 5px; background: white; box-shadow: 0 4px 16px rgba(40,72,68,.07); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-media { width: min(100%, 360px); max-height: 420px; margin-bottom: 8px; display: block; border-radius: 12px; object-fit: contain; }
.message.mine .message-bubble { border-radius: 17px 17px 5px 17px; background: var(--deep); color: white; }
.message-time { margin: 5px 4px 0; color: #8a9895; font-size: 9px; }
.message.mine .message-time { text-align: right; }
.message-compose { padding: 13px; display: flex; flex-wrap: wrap; gap: 9px; align-items: flex-end; border-top: 1px solid var(--line); background: white; }
.message-compose textarea { flex: 1; min-height: 44px; max-height: 130px; resize: none; border: 1px solid var(--line); border-radius: 17px; padding: 11px 14px; outline: 0; }

/* Profile and states */
.profile-card { padding: 28px; }
.profile-identity { display: flex; align-items: center; gap: 18px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.profile-identity h2 { margin: 0 0 5px; font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.profile-identity p { margin: 0; color: var(--muted); }
.profile-form { margin-top: 25px; display: grid; gap: 17px; }
.field { display: grid; gap: 7px; font-size: 12px; font-weight: 750; color: #55706c; }
.field input, .profile-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px; background: #fcfdfc; color: var(--ink); outline: 0; resize: vertical; }
.auth-google { margin-top: 10px; gap: 9px; }
.auth-google > span:first-child { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: white; color: #4285f4; box-shadow: 0 1px 5px rgba(0,0,0,.12); font-weight: 900; }
.profile-actions { display: flex; justify-content: flex-end; gap: 10px; }
.profile-links { margin-top: 17px; display: flex; gap: 10px; flex-wrap: wrap; }
.session-card { margin-top: 18px; padding: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 17px; background: white; }
.session-card .nav-badge { margin-left: auto; }
.session-card.has-unread { border-color: rgba(49,95,101,.34); }
.session-card.has-unread .chat-person p { color: var(--ink); font-weight: 700; }
.empty-state, .loading-state, .error-state { min-height: 280px; padding: 40px 20px; display: grid; place-items: center; align-content: center; text-align: center; color: var(--muted); }
.empty-symbol { width: 66px; height: 66px; margin-bottom: 15px; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: var(--deep); font-family: Georgia, serif; font-size: 28px; }
.empty-state h2 { margin: 0 0 8px; color: var(--ink); font-family: Georgia, serif; font-weight: 500; }
.empty-state p { max-width: 430px; margin: 0; line-height: 1.6; }
.empty-state .button { margin-top: 18px; }
.spinner { width: 28px; height: 28px; border: 3px solid #d2e0da; border-top-color: var(--deep); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Modal and toast */
.modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(18, 43, 44, .52); backdrop-filter: blur(7px); }
.modal-card { position: relative; width: min(440px, 100%); padding: 34px; border-radius: 27px; background: white; box-shadow: 0 30px 90px rgba(14,45,44,.24); }
.modal-close { position: absolute; top: 16px; right: 17px; width: 33px; height: 33px; border: 0; border-radius: 50%; background: var(--mist); cursor: pointer; font-size: 20px; }
.modal-mark { margin-bottom: 22px; }
.modal-card h2 { margin: 0; font-family: Georgia, serif; font-size: 34px; font-weight: 500; }
.modal-card > .muted { margin: 8px 0 24px; line-height: 1.55; }
.modal-card form { display: grid; gap: 15px; }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.auth-switch { margin: 19px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.auth-switch button { border: 0; background: transparent; color: var(--deep); cursor: pointer; font-weight: 850; }
.auth-forgot { margin-top: 8px; }
.auth-forgot button { color: var(--muted); font-weight: 650; text-decoration: underline; }
.toast { position: fixed; z-index: 150; top: 20px; left: 50%; transform: translateX(-50%); width: min(430px, calc(100% - 32px)); padding: 13px 17px; display: flex; gap: 11px; align-items: flex-start; border: 1px solid rgba(49,95,101,.16); border-radius: 15px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.toast > span { width: 23px; height: 23px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: var(--deep); font-size: 12px; font-weight: 900; }
.toast.error > span { color: var(--danger); background: #f5e3e3; }
.toast p { margin: 2px 0 0; line-height: 1.45; font-size: 13px; }

@media (max-width: 900px) {
  .landing-hero { grid-template-columns: 1fr; gap: 50px; padding-top: 55px; }
  .hero-art { min-height: 440px; }
  .landing-split { margin: 0 34px; grid-template-columns: 1fr; gap: 45px; }
  .page-grid { grid-template-columns: 1fr; }
  .side-note { position: static; }
}

@media (max-width: 720px) {
  body:not(.landing) { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .landing-header { height: 70px; padding: 0 18px; }
  .landing-header .brand small, .landing-actions .button { display: none; }
  .landing-hero { min-height: 0; padding: 52px 20px 65px; }
  .hero-copy h1 { font-size: clamp(42px, 13vw, 58px); }
  .hero-lead { font-size: 16px; }
  .hero-actions { display: grid; }
  .hero-actions .button { width: 100%; }
  .hero-art { min-height: 390px; border-radius: 42px; }
  .quiet-card { left: 18px; right: 18px; bottom: 25px; }
  .landing-section { padding: 74px 20px; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-grid article { min-height: 220px; }
  .landing-split { margin: 0; padding: 75px 20px; }
  .crisis-panel { margin: 0 20px 75px; padding: 25px 22px; }
  .landing-footer { padding: 45px 20px; display: grid; }
  .landing-footer p { text-align: left; }

  .app-shell { padding-top: 64px; }
  .app-header { height: 64px; padding: 0 16px; }
  .app-header .brand b { font-size: 18px; }
  .app-header .brand small, .desktop-nav { display: none; }
  .app-header .brand-symbol { width: 34px; height: 34px; }
  .header-actions { margin-left: auto; }
  .header-actions .button { min-height: 36px; padding: 0 14px; }
  /* 面板挂在铃铛上，right:0 对齐的是铃铛右边，而铃铛右边还有头像（39px）和
     间距（9px），于是 100vw-32px 宽的面板左边会溢出屏幕。往右让开这 48px，
     面板右边就正好落在顶栏的 16px 内边距上。 */
  .notification-panel { right: -48px; max-height: min(66vh, 420px); }
  .app-main { width: calc(100% - 28px); padding: 27px 0 40px; }
  .mobile-nav { position: fixed; z-index: 35; inset: auto 0 0; height: calc(66px + env(safe-area-inset-bottom)); padding: 6px 10px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(16px); }
  .mobile-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 12px; color: #758582; font-size: 10px; font-weight: 750; }
  .mobile-nav .nav-badge { position: absolute; top: 6px; left: calc(50% + 5px); }
  .mobile-nav a.active { color: var(--deep); background: #eff6f2; }
  .mobile-nav .nav-icon { width: 21px; height: 21px; }
  body.chat-route .mobile-nav { display: none; }
  body.chat-route { padding-bottom: 0; }
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: 35px; }
  .page-head p { font-size: 14px; }
  .counselor-grid { grid-template-columns: 1fr; }
  .counselor-card { padding: 20px; }
  .counselor-bio { min-height: 0; }
  .side-note { padding: 20px; }
  .composer { padding: 17px; }
  .post-card { padding: 18px; }
  /* 提示文案和两个按钮在窄屏挤成一行会互相压扁，改为上下排 */
  .composer-footer { flex-direction: column; align-items: stretch; gap: 11px; }
  .composer-actions { justify-content: space-between; }
  .composer-actions .button { flex: 1; justify-content: center; }
  /*
   * 移动端聊天占满一屏（顶栏 64px，底部导航在 chat-route 下已隐藏），
   * 从 .app-main 往下每一层都是 flex:1 + min-height:0，消息只在列表内部滚动，
   * 不会把整页拉长、也不会把 chat-header 顶到固定顶栏后面去。
   */
  /* app-shell 的 min-height:100vh 在地址栏展开时比 dvh 高，会让整页多出一截空滚动 */
  body.chat-route .app-shell { min-height: 0; }
  body.chat-route .app-main { height: calc(100vh - 64px); padding: 12px 0 0; display: flex; flex-direction: column; }
  .chat-page { flex: 1; min-height: 0; margin: 0; display: flex; flex-direction: column; }
  .chat-header { flex: none; margin-bottom: 10px; padding: 10px 12px; gap: 10px; }
  .chat-header .avatar { width: 40px; height: 40px; font-size: 17px; }
  .back-button { flex: none; width: 34px; height: 34px; font-size: 19px; }
  .conversation-card { flex: 1; height: auto; min-height: 0; border-radius: 20px; }
  .message-list { padding: 16px 14px; gap: 11px; }
  .message-media { width: 100%; max-height: 320px; }
  .message { max-width: 84%; }
  /* 一行塞不下「添加图片 + 输入框 + 发送」，输入框会被挤到放不下一行文字。
     改为输入框独占一行，两个按钮排到下面一行。 */
  .message-compose { flex: none; padding: 10px 10px max(10px, env(safe-area-inset-bottom)); gap: 8px; }
  .message-compose .compose-preview { order: 0; }
  .message-compose textarea { order: 1; flex: 1 1 100%; min-height: 42px; max-height: 108px; }
  .message-compose .file-button { order: 2; }
  .message-compose button[type="submit"] { order: 3; margin-left: auto; min-width: 92px; }
  /* 这条要写在媒体查询里，否则会被上面的 100vh 规则按顺序盖掉 */
  @supports (height: 100dvh) {
    body.chat-route .app-main { height: calc(100dvh - 64px); }
  }
  .profile-card { padding: 20px; }
  .profile-identity { align-items: flex-start; }
  .profile-actions, .session-card { align-items: stretch; flex-direction: column; }
  .modal { align-items: end; padding: 0; }
  .modal-card { width: 100%; padding: 30px 22px max(25px, env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; }
  .modal-card h2 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
