/* ==========================================================================
   小树苗 · 亲子沟通话术助手  设计系统
   风格：儿童友好 / 糖果色 / 大圆角 / 3D 按钮 / 移动端优先
   纯手写，无任何外部 CDN 依赖，离线可用
   ========================================================================== */

:root {
  /* 主色 */
  --green: #35c46a;
  --green-dark: #24a355;
  --green-soft: #e6f8ed;
  --yellow: #ffc94d;
  --yellow-dark: #e9ad25;
  --orange: #ff9f43;
  --coral: #ff7a6b;
  --coral-dark: #e35f50;
  --sky: #52bff5;
  --sky-dark: #2fa3dd;
  --purple: #a78bfa;
  --pink: #ff9ec4;

  /* 中性 */
  --bg: #fff8ec;
  --bg-2: #fffdf8;
  --card: #ffffff;
  --ink: #33413a;
  --ink-2: #55645b;
  --muted: #93a29a;
  --line: #f1e7d7;

  --radius: 24px;
  --radius-sm: 16px;
  --radius-lg: 32px;

  --shadow: 0 8px 24px rgba(126, 108, 74, 0.1);
  --shadow-sm: 0 4px 12px rgba(126, 108, 74, 0.08);
  --shadow-lg: 0 16px 40px rgba(126, 108, 74, 0.16);

  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 201, 77, 0.35), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(82, 191, 245, 0.28), transparent 40%),
    radial-gradient(circle at 78% 92%, rgba(255, 158, 196, 0.3), transparent 45%),
    radial-gradient(circle at 8% 88%, rgba(53, 196, 106, 0.22), transparent 42%);
  background-attachment: fixed;
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- 布局 ---------- */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: rgba(255, 253, 248, 0.72);
  backdrop-filter: blur(2px);
  box-shadow: 0 0 60px rgba(126, 108, 74, 0.08);
}

@media (min-width: 520px) {
  body {
    padding: 18px 0;
  }
  .app-shell {
    min-height: calc(100vh - 36px);
    border-radius: 36px;
    overflow: hidden;
  }
}

.page {
  padding: 18px 18px calc(96px + env(safe-area-inset-bottom, 0px));
}

.page--plain {
  padding-bottom: 28px;
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 12px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(180deg, rgba(255, 248, 236, 0.98), rgba(255, 248, 236, 0.86));
  backdrop-filter: blur(10px);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar__title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.topbar__sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: -3px;
  white-space: nowrap;
}

.topbar__spacer {
  flex: 1;
}

.topbar__back {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 18px;
  color: var(--ink);
  flex: none;
}

/* ---------- 吉祥物 ---------- */
.mascot {
  width: 44px;
  height: 44px;
  flex: none;
  animation: bob 3.4s ease-in-out infinite;
}

.mascot--lg {
  width: 128px;
  height: 128px;
  animation: bob 3.6s ease-in-out infinite;
}

.mascot--xl {
  width: 168px;
  height: 168px;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-7px) rotate(2deg);
  }
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.card__title {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card--soft {
  background: linear-gradient(160deg, #fff, var(--bg-2));
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  width: 100%;
  background: var(--green);
  box-shadow: 0 5px 0 var(--green-dark);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
  letter-spacing: 0.5px;
}

.btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--green-dark);
}

.btn:disabled {
  filter: grayscale(0.45) opacity(0.6);
  cursor: not-allowed;
  box-shadow: 0 5px 0 #b9c4bd;
  background: #b9c4bd;
}

.btn--yellow {
  background: var(--yellow);
  box-shadow: 0 5px 0 var(--yellow-dark);
  color: #6b4a00;
}
.btn--yellow:active {
  box-shadow: 0 1px 0 var(--yellow-dark);
}

.btn--coral {
  background: var(--coral);
  box-shadow: 0 5px 0 var(--coral-dark);
}
.btn--coral:active {
  box-shadow: 0 1px 0 var(--coral-dark);
}

.btn--sky {
  background: var(--sky);
  box-shadow: 0 5px 0 var(--sky-dark);
}
.btn--sky:active {
  box-shadow: 0 1px 0 var(--sky-dark);
}

.btn--ghost {
  background: #fff;
  color: var(--ink-2);
  box-shadow: 0 4px 0 var(--line);
  border: 1px solid var(--line);
}
.btn--ghost:active {
  box-shadow: 0 1px 0 var(--line);
}

.btn--sm {
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 14px;
  width: auto;
}

.btn--block {
  width: 100%;
}

/* ---------- 徽标 / 药丸 ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--green-soft);
  color: var(--green-dark);
  white-space: nowrap;
}

.pill--yellow {
  background: #fff4d6;
  color: #a3700a;
}
.pill--coral {
  background: #ffeae6;
  color: var(--coral-dark);
}
.pill--sky {
  background: #e4f4fe;
  color: var(--sky-dark);
}
.pill--purple {
  background: #f0ebff;
  color: #7156d6;
}
.pill--muted {
  background: #f3f2ef;
  color: var(--muted);
}

/* ---------- 输入 ---------- */
.field {
  margin-bottom: 14px;
}

.field__label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-2);
  margin-bottom: 7px;
}

.input,
.textarea,
.select {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(53, 196, 106, 0.14);
}

.textarea {
  resize: vertical;
  min-height: 104px;
  line-height: 1.6;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2393a29a'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 22px;
  padding-right: 40px;
}

.field-row {
  display: flex;
  gap: 10px;
}
.field-row > * {
  flex: 1;
}

/* ---------- 提示条 ---------- */
.alert {
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.alert--error {
  background: #ffeae6;
  color: var(--coral-dark);
}
.alert--ok {
  background: var(--green-soft);
  color: var(--green-dark);
}
.alert--info {
  background: #e4f4fe;
  color: var(--sky-dark);
}

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
}

@media (min-width: 520px) {
  .tabbar {
    border-radius: 0 0 36px 36px;
  }
}

.tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  border-radius: 14px;
  transition: color 0.15s ease, background 0.15s ease;
}

.tabbar__item .ico {
  font-size: 20px;
  line-height: 1;
  filter: grayscale(1) opacity(0.55);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.tabbar__item.is-active {
  color: var(--green-dark);
  background: var(--green-soft);
}
.tabbar__item.is-active .ico {
  filter: none;
  transform: translateY(-1px) scale(1.12);
}

/* ---------- 场景芯片 ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 2px dashed #ffe0a3;
  background: #fffbf0;
  color: #96660a;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s ease, background 0.15s ease;
}

.chip:active {
  transform: scale(0.96);
  background: #fff3d8;
}

/* ---------- 结果卡片 ---------- */
.result {
  animation: pop 0.35s cubic-bezier(0.2, 1.1, 0.4, 1);
}

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

.result__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.result__title {
  font-size: 18px;
  font-weight: 900;
  margin: 0;
}

.bubble {
  background: linear-gradient(160deg, #f3fbf6, #eaf7f0);
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.75;
  border: 1px solid #dff0e6;
}

.script {
  border-radius: 18px;
  padding: 15px 16px;
  margin-bottom: 12px;
  border: 2px solid;
  position: relative;
}

.script--a {
  background: #fff6f4;
  border-color: #ffd9d2;
}
.script--b {
  background: #eef6ff;
  border-color: #cfe6fb;
}
.script--c {
  background: #fdf8e9;
  border-color: #ffe9b5;
}

.script__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  margin-bottom: 9px;
  box-shadow: var(--shadow-sm);
}

.script--a .script__tag {
  color: var(--coral-dark);
}
.script--b .script__tag {
  color: var(--sky-dark);
}
.script--c .script__tag {
  color: #a3700a;
}

.script__say {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.8;
  font-weight: 600;
  margin: 0 0 10px;
  padding-left: 12px;
  border-left: 3px solid rgba(0, 0, 0, 0.08);
}

.script__why {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
}

.script__why b {
  color: var(--ink-2);
}

.tips {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tips li {
  display: flex;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-2);
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.tips li:last-child {
  border-bottom: none;
}
.tips li::before {
  content: "💡";
  flex: none;
}

.encourage {
  margin-top: 12px;
  background: linear-gradient(135deg, #fff4d6, #ffe9f2);
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #8a5a00;
  text-align: center;
}

/* ---------- 加载 ---------- */
.loading {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 22px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--green-soft);
  border-top-color: var(--green);
  animation: spin 0.8s linear infinite;
}

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

/* ---------- 列表项 ---------- */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.list-item:last-child {
  border-bottom: none;
}

.list-item__ico {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--green-soft);
  flex: none;
}

.list-item__body {
  flex: 1;
  min-width: 0;
}

.list-item__title {
  font-size: 15px;
  font-weight: 800;
}

.list-item__sub {
  font-size: 12px;
  color: var(--muted);
}

.list-item__arrow {
  color: #cfd8d2;
  font-size: 18px;
}

/* ---------- 空状态 ---------- */
.empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--muted);
}
.empty__title {
  font-weight: 800;
  color: var(--ink-2);
  margin: 12px 0 4px;
}
.empty__sub {
  font-size: 13px;
}

/* ---------- 登录页 ---------- */
.auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 22px 40px;
  max-width: 480px;
  margin: 0 auto;
}

.auth__hero {
  text-align: center;
  margin-bottom: 18px;
}

.auth__hero h1 {
  font-size: 27px;
  font-weight: 900;
  margin: 8px 0 4px;
  letter-spacing: 2px;
  color: var(--green-dark);
}

.auth__hero p {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0;
}

.auth__switch {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

.auth__switch a {
  font-weight: 800;
}

.auth__tabs {
  display: flex;
  background: #fff;
  border-radius: 18px;
  padding: 5px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.auth__tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
  color: var(--muted);
}

.auth__tab.is-active {
  background: var(--green);
  color: #fff;
  box-shadow: 0 3px 0 var(--green-dark);
}

.demo-hint {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.9;
}
.demo-hint code {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px 7px;
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 700;
}

/* ---------- 充值 ---------- */
.pkg {
  display: flex;
  align-items: center;
  gap: 13px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 15px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease, background 0.15s ease;
  position: relative;
}

.pkg:active {
  transform: scale(0.985);
}

.pkg.is-selected {
  border-color: var(--green);
  background: linear-gradient(160deg, #f2fcf6, #ffffff);
  box-shadow: 0 6px 18px rgba(53, 196, 106, 0.16);
}

.pkg__emoji {
  font-size: 30px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border-radius: 18px;
  flex: none;
}

.pkg__body {
  flex: 1;
  min-width: 0;
}

.pkg__name {
  font-weight: 900;
  font-size: 16px;
}

.pkg__desc {
  font-size: 12.5px;
  color: var(--muted);
}

.pkg__price {
  text-align: right;
  flex: none;
}

.pkg__price b {
  font-size: 20px;
  color: var(--coral-dark);
  font-weight: 900;
}

.pkg__badge {
  position: absolute;
  top: -9px;
  right: 14px;
  background: var(--coral);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(255, 122, 107, 0.4);
}

/* ---------- 我的页 ---------- */
.profile-hero {
  background: linear-gradient(140deg, #35c46a, #52bff5);
  border-radius: var(--radius);
  padding: 22px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 12px 28px rgba(53, 196, 106, 0.28);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.profile-hero::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 130px;
  height: 130px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}

.profile-hero__avatar {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  font-size: 30px;
  flex: none;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.profile-hero__name {
  font-size: 20px;
  font-weight: 900;
}

.profile-hero__meta {
  font-size: 12.5px;
  opacity: 0.92;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat {
  background: #fff;
  border-radius: 20px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat b {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: var(--green-dark);
}

.stat span {
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- 工具类 ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-14 { margin-bottom: 14px; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.bold { font-weight: 800; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.hidden { display: none !important; }

/* 免责声明 */
.disclaimer {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
  padding: 10px 6px 0;
}

/* 弹层 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(51, 65, 58, 0.45);
  display: grid;
  place-items: center;
  z-index: 90;
  padding: 24px;
  animation: fade 0.2s ease;
}

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

.modal {
  background: #fff;
  border-radius: 28px;
  padding: 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  animation: pop 0.3s cubic-bezier(0.2, 1.1, 0.4, 1);
  text-align: center;
}

.modal h3 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 900;
}

.modal p {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 16px;
}

.modal__amount {
  font-size: 34px;
  font-weight: 900;
  color: var(--coral-dark);
  margin: 6px 0 4px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(51, 65, 58, 0.94);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  z-index: 120;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 82%;
  text-align: center;
}

.toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   孩子档案（长期记忆）相关组件
   ========================================================================== */

/* ---------- 可点选标签（checkbox / radio 伪装成糖果按钮） ---------- */
.chip-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip-check {
  display: inline-block;
  cursor: pointer;
  position: relative;
}

.chip-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.chip-check span {
  display: inline-block;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-2);
  background: #fff;
  border: 2px solid var(--line);
  transition: all 0.14s ease;
  user-select: none;
}

.chip-check input:checked + span {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 3px 0 var(--green-dark);
  transform: translateY(-1px);
}

.chip-check--warn input:checked + span {
  background: var(--coral);
  border-color: var(--coral);
  box-shadow: 0 3px 0 var(--coral-dark);
}

.chip-check input:focus-visible + span {
  outline: 3px solid rgba(53, 196, 106, 0.35);
  outline-offset: 2px;
}

/* ---------- 自定义标签：「其他＋」 ----------
   标签目录是封闭集合，家长遇到目录里没有的情况时，此前只能放弃不选。
   自填项统一用虚线边框跟预置项区分，一眼能看出「这是我加的」。 */
.chip-add {
  display: inline-flex;
  align-items: center;
  padding: 9px 15px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--green-dark);
  background: #fff;
  border: 2px dashed #b9e6cb;
  cursor: pointer;
  transition: all 0.14s ease;
}

.chip-add:active {
  transform: scale(0.96);
}

.chip-add__input {
  width: 152px;
  padding: 9px 15px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--green);
  outline: none;
}

.chip-check--custom span {
  border-style: dashed;
  border-color: #b9e6cb;
  color: var(--green-dark);
}

.chip-check--custom input:checked + span {
  border-style: solid;
}

/* ---------- 只读标签 ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}

.tag--green {
  background: var(--green-soft);
  color: var(--green-dark);
}
.tag--amber {
  background: #fff4d6;
  color: #a3700a;
}
.tag--coral {
  background: #ffeae6;
  color: var(--coral-dark);
}

/* ---------- 档案卡片 ---------- */
.child-card__avatar {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--bg);
  display: grid;
  place-items: center;
  font-size: 24px;
  flex: none;
}

.child-block {
  margin-top: 14px;
}

.child-block__label {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-2);
  margin-bottom: 7px;
}

.child-block__label small {
  font-weight: 400;
  margin-left: 5px;
}

.effective-item {
  background: var(--green-soft);
  border-radius: 14px;
  padding: 10px 13px;
  margin-bottom: 8px;
  line-height: 1.6;
}

.effective-item:last-child {
  margin-bottom: 0;
}

.card--warn {
  background: linear-gradient(160deg, #fff8f6, #fff);
  border: 1px solid #ffd9d2;
}

/* ---------- 问答页：孩子选择器 ---------- */
.child-picker {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.child-picker::-webkit-scrollbar {
  display: none;
}

.child-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 15px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--line);
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-2);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.14s ease;
}

.child-chip.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 3px 0 var(--green-dark);
}

.child-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.child-chip.is-active .child-chip__dot {
  background: #fff;
}

/* ---------- 结果卡片：已参考档案的提示 ---------- */
.profile-note {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--green-soft);
  color: var(--green-dark);
  border-radius: 14px;
  padding: 9px 13px;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ---------- 结果卡片：反馈 ---------- */
.feedback {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  text-align: center;
}

.feedback__q {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink-2);
  margin-bottom: 10px;
}

.feedback__btns {
  display: flex;
  gap: 10px;
}

.feedback__btn {
  flex: 1;
  padding: 12px 10px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.14s ease;
}

.feedback__btn:active {
  transform: scale(0.97);
}

.feedback__btn--yes {
  border-color: #c9ecd8;
  background: #f4fcf7;
  color: var(--green-dark);
}

.feedback__btn--yes.is-picked {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.feedback__btn--no {
  border-color: #ffd9d2;
  background: #fff8f6;
  color: var(--coral-dark);
}

.feedback__btn--no.is-picked {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.feedback__btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.feedback__done {
  font-size: 13px;
  font-weight: 700;
  color: var(--green-dark);
}

/* ==========================================================================
   落地页（小红书引流专用）
   与产品内页共用同一套设计系统，但信息密度更高：
   目标是「一眼看懂价值 → 立刻点试用」，所以首屏必须说完三件事。
   ========================================================================== */
.landing-hero {
  position: relative;
  text-align: center;
  padding: 26px 20px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 0%, rgba(53, 196, 106, 0.2), transparent 62%),
    radial-gradient(circle at 92% 100%, rgba(255, 158, 196, 0.18), transparent 55%),
    linear-gradient(160deg, #fffdf8, #fff5e8);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.landing-hero__mascot {
  width: 86px;
  height: 86px;
  filter: drop-shadow(0 8px 16px rgba(53, 196, 106, 0.28));
}

.landing-hero__badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: var(--green-dark);
  background: var(--green-soft);
  border: 1px solid #c9eed8;
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 10px;
}

.landing-hero h1 {
  font-size: 25px;
  line-height: 1.36;
  margin: 8px 0 10px;
  letter-spacing: -0.2px;
}

.landing-hero h1 em {
  font-style: normal;
  color: var(--green-dark);
  background: linear-gradient(180deg, transparent 62%, rgba(255, 201, 77, 0.55) 62%);
  padding: 0 2px;
}

.landing-hero__sub {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0 auto 18px;
  max-width: 320px;
}

.landing-hero__cta {
  display: grid;
  gap: 10px;
  max-width: 320px;
  margin: 0 auto;
}

.landing-cta-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

.landing-section {
  margin-top: 18px;
}

.landing-section__title {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 4px;
}

.landing-section__sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
}

/* --- 痛点共鸣 --- */
.pain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.pain-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--coral);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}

.pain-list b {
  color: var(--ink);
}

/* --- 输出样例 --- */
.landing-demo {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.landing-demo__ask {
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.landing-demo__ask b {
  color: var(--ink);
}

.landing-demo__card {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink);
  background: var(--green-soft);
  border: 1px solid #cdeedb;
}

.landing-demo__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
  background: var(--green);
  color: #fff;
}

.landing-demo__why {
  font-size: 12px;
  color: var(--ink-2);
  margin: 8px 0 0;
}

.landing-demo__avoid {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--green-dark);
  background: #fff;
  border: 1px dashed #c9eed8;
  border-radius: 999px;
  padding: 5px 12px;
  margin-top: 12px;
}

/* --- 卖点 --- */
.feature-grid {
  display: grid;
  gap: 12px;
}

.feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.feature__ico {
  font-size: 22px;
  line-height: 1.2;
}

.feature h3 {
  margin: 0 0 3px;
  font-size: 15px;
}

.feature p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
}

/* --- 上手步骤 --- */
.step-list {
  display: grid;
  gap: 10px;
}

.step {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.step__no {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* --- FAQ --- */
.faq {
  display: grid;
  gap: 8px;
}

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.faq summary {
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "＋ ";
  color: var(--green-dark);
  font-weight: 800;
}

.faq details[open] summary::before {
  content: "− ";
}

.faq p {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--ink-2);
}

.landing-foot {
  text-align: center;
  margin-top: 20px;
}

/* ==========================================================================
   后台管理（/admin）
   仅管理员可见。以移动端能看为主，同时给桌面端留出阅读宽度。
   ========================================================================== */
.admin-chart {
  height: 96px;
  margin-top: 10px;
  overflow: visible;
}

.admin-search {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.admin-search .input {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-user {
  padding: 16px;
}

.admin-user__ops {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.admin-user__ops summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--green-dark);
  list-style: none;
}

.admin-user__ops summary::-webkit-details-marker {
  display: none;
}

.admin-user__ops summary::before {
  content: "⚙ ";
}

.admin-user__ops[open] summary {
  margin-bottom: 12px;
}

.admin-form {
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--green-soft);
  border: 1px solid #cdeedb;
  border-radius: var(--radius-sm);
}

.admin-form .field {
  margin-bottom: 10px;
}

.admin-form .btn {
  width: 100%;
}

/* ===== 后台：排序切换 / 表格 / 告警色（本轮新增） ===== */

.sort-tabs {
  display: flex;
  gap: 8px;
  margin: 10px 0 10px;
}

.sort-tab {
  padding: 6px 14px;
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.sort-tab.is-active {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
  font-weight: 600;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  padding: 6px 4px;
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: 7px 4px;
  color: var(--ink);
  border-bottom: 1px solid #faf4ea;
}

.table tr:last-child td {
  border-bottom: none;
}

.table th:not(:first-child),
.table td:not(:first-child) {
  text-align: right;
}

/* 毛利为负 / 余额告警：这是「卖得越多亏得越多」的信号，必须一眼看见 */
.c-red {
  color: var(--coral-dark);
}

.tiny code {
  padding: 1px 5px;
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
}
