/* ============================================================
   ben我 · 全局样式
   黑白灰 · 素净的纸面与墨色，靠字重、留白与层级拉开关系
   ============================================================ */

:root {
  --bg: #f6f6f6;
  --bg-warm: #efefef;
  --surface: #ffffff;
  --surface-2: #f3f3f3;
  --ink: #161616;
  --ink-2: #5a5a5a;
  --ink-3: #8c8c8c;
  --line: #e3e3e3;
  --line-strong: #cbcbcb;

  --brand: #161616;
  --brand-dark: #000000;
  --brand-soft: #ececec;
  --brand-line: #d2d2d2;
  --accent: #4d4d4d;
  --accent-soft: #ebebeb;
  --danger: #2e2e2e;
  --danger-soft: #f0f0f0;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 7px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 14px 32px -18px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 30px 60px -30px rgba(0, 0, 0, 0.3);

  --maxw: 1120px;
  --narrow: 760px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Songti SC", "STSong", "SimSun", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* 纸张底色上的细网点，增加一点质感 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.05) 0.5px, transparent 0.5px);
  background-size: 22px 22px;
  opacity: 0.6;
}

body > * {
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 0.9em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

::selection {
  background: #d6d6d6;
}

/* ---------------- 布局 ---------------- */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow {
  max-width: var(--narrow);
  margin: 0 auto;
  padding: 0 24px;
}

.page {
  padding: 40px 0 72px;
  min-height: 60vh;
}

.page-head {
  margin-bottom: 28px;
}

.page-title {
  font-size: 26px;
  margin-bottom: 8px;
}

.page-desc {
  color: var(--ink-2);
  font-size: 14.5px;
  margin: 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.spacer {
  flex: 1;
}

/* ---------------- 导航 ---------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 246, 246, 0.86);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  color: var(--ink-2);
  font-size: 14.5px;
  padding: 6px 11px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.16s, color 0.16s;
}

.nav-link:hover {
  background: rgba(0, 0, 0, 0.055);
  color: var(--brand);
  text-decoration: none;
}

.nav-link.is-active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 500;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 14.5px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.12s, background 0.16s, border-color 0.16s, box-shadow 0.16s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.5;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
}

.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #333333;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: transparent;
}

.btn-danger:hover {
  background: var(--danger-soft);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 13.5px;
  border-radius: 8px;
}

.btn-lg {
  padding: 13px 28px;
  font-size: 16px;
  border-radius: 12px;
}

.btn-block {
  width: 100%;
}

/* ---------------- 表单 ---------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
}

.label .req {
  color: var(--accent);
  margin-left: 2px;
}

.hint {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.6;
}

.input,
.textarea,
.select {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  transition: border-color 0.16s, box-shadow 0.16s;
  line-height: 1.6;
}

.textarea {
  resize: vertical;
  min-height: 92px;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.input::placeholder,
.textarea::placeholder {
  color: #adadad;
}

.input-group {
  display: flex;
  gap: 8px;
}

.input-group .input {
  flex: 1;
}

.form-error {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--ink);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13.5px;
}

.form-ok {
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--brand-dark);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13.5px;
}

/* ---------------- 卡片 ---------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-pad {
  padding: 22px;
}

.card-lg {
  padding: 30px;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 16.5px;
  margin-bottom: 4px;
}

.card-sub {
  font-size: 13.5px;
  color: var(--ink-2);
  margin: 0;
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 22px 0;
}

/* ---------------- 标签 ---------------- */

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 12.5px;
  line-height: 1.7;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.tag-brand {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: var(--brand-line);
}

.tag-accent {
  background: var(--accent-soft);
  color: #3d3d3d;
  border-color: #dcdcdc;
}

.tag-plain {
  background: transparent;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* ---------------- 首页 ---------------- */

.hero {
  padding: 72px 0 56px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 22px;
  letter-spacing: 0.02em;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 52px;
  line-height: 1.24;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
}

.hero-title .em {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 9px;
  text-decoration-color: var(--line-strong);
}

.hero-sub {
  max-width: 560px;
  margin: 0 auto 30px;
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-3);
}

.section {
  padding: 56px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 38px;
}

.section-title {
  font-size: 28px;
  margin-bottom: 10px;
}

.section-sub {
  color: var(--ink-2);
  font-size: 15px;
  margin: 0;
}

.step {
  text-align: left;
  padding: 24px;
}

.step-num {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--brand);
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--brand-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.step-title {
  font-size: 16.5px;
  margin-bottom: 6px;
}

.step-desc {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0;
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

/* 免费 / 进阶 对比 */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.plan {
  padding: 26px;
  position: relative;
}

.plan-plus {
  border-color: var(--brand-line);
  box-shadow: var(--shadow);
}

.plan-badge {
  position: absolute;
  top: -11px;
  left: 26px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.plan-name {
  font-size: 17px;
  margin-bottom: 6px;
}

.plan-price {
  font-family: var(--font-serif);
  font-size: 34px;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 2px;
}

.plan-price .cur {
  font-size: 18px;
  margin-right: 2px;
}

.plan-price .unit {
  font-size: 13px;
  color: var(--ink-3);
  font-family: var(--font-sans);
  margin-left: 4px;
}

.plan-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.plan-list li {
  font-size: 14.2px;
  color: var(--ink-2);
  padding-left: 24px;
  position: relative;
  line-height: 1.65;
}

.plan-list li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}

.plan-list li.off {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: rgba(140, 140, 140, 0.6);
}

.plan-list li.off::before {
  background: var(--line-strong);
}

/* ---------------- 登录页 ---------------- */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 24px;
}

.auth-brand .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 17px;
  margin-bottom: 12px;
}

.auth-title {
  font-family: var(--font-serif);
  font-size: 24px;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.auth-sub {
  font-size: 13.5px;
  color: var(--ink-3);
  margin: 0;
}

.tabs {
  display: flex;
  background: var(--surface-2);
  border-radius: 11px;
  padding: 3px;
  margin-bottom: 22px;
  gap: 3px;
}

.tab {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-2);
  padding: 8px 6px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}

.tab:hover {
  color: var(--ink);
}

.tab.is-active {
  background: var(--surface);
  color: var(--brand);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.auth-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
}

.link-btn {
  background: none;
  border: 0;
  color: var(--brand);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------- 档案 ---------------- */

.profile-hero {
  padding: 30px;
  background: linear-gradient(180deg, #f2f2f2 0%, #ffffff 60%);
  border-color: var(--brand-line);
}

.profile-greeting {
  font-family: var(--font-serif);
  font-size: 25px;
  margin-bottom: 10px;
}

.profile-summary {
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.9;
}

.insight-block {
  padding: 22px;
}

.insight-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}

.insight-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

.insight-dot.accent {
  background: var(--accent);
}

.insight-dot.amber {
  background: #9a9a9a;
}

.insight-title {
  font-size: 15.5px;
}

.insight-item {
  padding: 13px 0;
  border-top: 1px dashed var(--line);
}

.insight-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.insight-item-name {
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 3px;
}

.insight-item-desc {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.8;
}

.letter {
  background: #fafafa;
  border: 1px solid #e2e2e2;
  border-radius: var(--radius);
  padding: 26px;
  font-family: var(--font-serif);
  font-size: 15.5px;
  line-height: 2.05;
  color: #2b2b2b;
  white-space: pre-wrap;
}

/* ---------------- 对话 ---------------- */

.chat-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 62px);
  padding: 20px 0 0;
}

.chat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.chat-who {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.chat-name {
  font-size: 15px;
  font-weight: 600;
}

.chat-status {
  font-size: 12.5px;
  color: var(--ink-3);
}

.chat-quota {
  font-size: 12.5px;
  color: var(--ink-3);
}

.chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 22px 2px 10px;
  scroll-behavior: smooth;
}

.msg {
  display: flex;
  margin-bottom: 18px;
  gap: 10px;
}

.msg-user {
  justify-content: flex-end;
}

.bubble {
  max-width: 78%;
  padding: 13px 17px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.8;
  word-break: break-word;
}

.bubble p {
  margin: 0 0 0.7em;
}

.bubble p:last-child {
  margin-bottom: 0;
}

.bubble ul {
  margin: 0.4em 0;
  padding-left: 1.2em;
}

.bubble li {
  margin-bottom: 0.28em;
}

.bubble h3,
.bubble h4 {
  font-size: 15.5px;
  margin: 0.9em 0 0.4em;
}

.bubble .code-block {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  overflow-x: auto;
  white-space: pre-wrap;
}

.msg-ai .bubble {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top-left-radius: 5px;
  box-shadow: var(--shadow-sm);
}

.msg-user .bubble {
  background: var(--brand);
  color: #fff;
  border-top-right-radius: 5px;
}

.msg-user .bubble a {
  color: #d0d0d0;
}

.chat-empty {
  text-align: center;
  padding: 40px 0 10px;
}

.chat-empty-title {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-bottom: 8px;
}

.chat-empty-desc {
  color: var(--ink-2);
  font-size: 14.5px;
  max-width: 460px;
  margin: 0 auto 22px;
  line-height: 1.85;
}

.starters {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 480px;
  margin: 0 auto;
}

.starter {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14.2px;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.16s, color 0.16s, transform 0.12s;
  line-height: 1.6;
}

.starter:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateX(2px);
}

.composer {
  border-top: 1px solid var(--line);
  padding: 14px 0 18px;
  background: var(--bg);
}

.composer-inner {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 9px 10px 9px 15px;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.composer-inner:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.09);
}

.composer textarea {
  flex: 1;
  border: 0;
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.7;
  max-height: 160px;
  padding: 6px 0;
  background: transparent;
  color: var(--ink);
}

.composer-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px 0;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
  animation: blink 1.3s infinite;
}

.typing span:nth-child(2) {
  animation-delay: 0.18s;
}

.typing span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes blink {
  0%, 60%, 100% { opacity: 0.25; }
  30% { opacity: 1; }
}

/* ---------------- 论坛 ---------------- */

.cat-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.cat {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.16s;
}

.cat:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.cat.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.post-card {
  display: block;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.16s, box-shadow 0.16s, transform 0.12s;
}

.post-card:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow);
  text-decoration: none;
  transform: translateY(-1px);
}

.post-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
  flex-wrap: wrap;
}

.post-title {
  font-size: 16.5px;
  font-weight: 600;
  margin-bottom: 7px;
  line-height: 1.5;
}

.post-excerpt {
  font-size: 14.2px;
  color: var(--ink-2);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--ink-3);
  flex-wrap: wrap;
}

.post-body {
  font-size: 15.5px;
  line-height: 1.9;
  color: #2b2b2b;
  white-space: pre-wrap;
  word-break: break-word;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 4px 12px;
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.16s;
}

.like-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.like-btn.is-on {
  background: var(--accent-soft);
  border-color: #cfcfcf;
  color: #2e2e2e;
}

.comment {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.comment:first-child {
  border-top: 0;
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.comment-who {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.comment-time {
  font-size: 12px;
  color: var(--ink-3);
}

.comment-body {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------------- 弹窗 ---------------- */

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade 0.18s ease;
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 20px;
  padding: 26px;
  box-shadow: var(--shadow-lg);
  animation: pop 0.2s ease;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.modal-title {
  font-size: 18px;
}

.modal-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
  padding: 0 4px;
}

.modal-close:hover {
  color: var(--ink);
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ---------------- 提示条 ---------------- */

#toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast-item {
  background: #161616;
  color: #f7f7f7;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 11px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.24s, transform 0.24s;
  max-width: 88vw;
}

.toast-item.in {
  opacity: 1;
  transform: none;
}

.toast-error {
  background: #3d3d3d;
}

.toast-ok {
  background: var(--brand-dark);
}

/* ---------------- 空状态 / 加载 ---------------- */

.empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--ink-2);
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 14px;
  color: var(--ink-3);
}

.loading {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-3);
  font-size: 13.5px;
  padding: 16px 0;
}

.loading .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-3);
  animation: blink 1.3s infinite;
}

.loading .dot:nth-child(2) {
  animation-delay: 0.18s;
}

.loading .dot:nth-child(3) {
  animation-delay: 0.36s;
}

.loading-text {
  margin-left: 6px;
}

.spin {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------------- 危机提示 ---------------- */

.crisis-bar {
  background: #161616;
  border: 1px solid #161616;
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 14.2px;
  color: #ededed;
  line-height: 1.8;
  margin: 14px 0;
}

.crisis-bar a {
  color: #ffffff;
}

.crisis-title {
  font-weight: 600;
  margin-bottom: 7px;
  font-size: 15px;
  color: #ffffff;
}

.crisis-line {
  font-size: 15px;
  margin: 8px 0;
}

/* ---------------- 页脚 ---------------- */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-warm);
  padding: 40px 0 46px;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 32px;
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: 0.05em;
}

.footer-slogan {
  font-size: 12.5px;
  color: var(--ink-3);
}

.footer-note {
  font-size: 12.8px;
  color: var(--ink-2);
  line-height: 1.85;
}

.footer-note p {
  margin-bottom: 8px;
}

.footer-crisis {
  color: #3d3d3d;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
}

.footer-links a {
  color: var(--ink-2);
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 860px) {
  .hero-title {
    font-size: 38px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 15px;
  }

  .wrap,
  .wrap-narrow,
  .nav-inner,
  .footer-inner,
  .chat-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav-inner {
    gap: 10px;
  }

  .nav-links {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    padding: 6px 8px;
    font-size: 14px;
    white-space: nowrap;
  }

  .nav-brand .brand-text {
    display: none;
  }

  .hero {
    padding: 44px 0 36px;
  }

  .hero-title {
    font-size: 31px;
  }

  .hero-sub {
    font-size: 15.5px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .bubble {
    max-width: 88%;
  }

  .chat-panel {
    height: calc(100vh - 58px);
  }

  .modal {
    padding: 20px;
    border-radius: 16px;
  }

  .card-lg,
  .profile-hero {
    padding: 20px;
  }

  .section {
    padding: 40px 0;
  }
}

/* ============================================================
   哲学流派测试 · 选项
   ============================================================ */

.quiz-opt {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  font-family: inherit;
}

.quiz-opt:hover {
  border-color: var(--ink);
  background: var(--surface-2);
}

.quiz-opt:active {
  transform: scale(0.99);
}

select.input {
  appearance: auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
}

/* ============================================================
   背景音乐开关（右下角浮动）
   ============================================================ */

#bgmBtn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

#bgmBtn:hover {
  color: var(--ink);
  border-color: var(--ink-2);
  transform: translateY(-2px);
}

#bgmBtn.is-on {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
  animation: bgm-pulse 2.4s ease-in-out infinite;
}

@keyframes bgm-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 22, 22, 0.25); }
  50% { box-shadow: 0 0 0 8px rgba(22, 22, 22, 0); }
}

/* ============================================================
   忧郁广告页
   ============================================================ */

.ad-shell {
  min-height: 100vh;
  background: #0d0d0d;
  color: #d8d8d8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 24px;
  line-height: 2.2;
}

.ad-line {
  opacity: 0;
  transform: translateY(14px);
  animation: ad-rise 1.4s ease forwards;
}

@keyframes ad-rise {
  to { opacity: 1; transform: translateY(0); }
}

.ad-line.dim { color: #6e6e6e; }
.ad-line.small { font-size: 13.5px; color: #8a8a8a; }
.ad-title {
  font-size: clamp(26px, 5vw, 42px);
  color: #f2f2f2;
  font-weight: 600;
  margin: 18px 0;
}
.ad-cta {
  margin-top: 34px;
  display: inline-block;
  border: 1px solid #4a4a4a;
  color: #e6e6e6;
  text-decoration: none;
  padding: 12px 30px;
  border-radius: 999px;
  transition: border-color .2s, background .2s;
}
.ad-cta:hover { border-color: #e6e6e6; background: #161616; }
