/* ==================================================================
   DIY 朋友圈 · 样式表
   设计基调：微信原生观感 —— 干净、克制、信息层级清楚
   颜色：微信绿 #07C160 / 朋友圈蓝 #576B95 / 页面灰 #EDEDED
   ================================================================== */

:root {
  --wx-green: #07c160;
  --wx-green-dark: #06ad56;
  --wx-green-soft: #e8f8ef;
  --wx-blue: #576b95;
  --wx-blue-soft: #eef2fb;

  --text: #191919;
  --text-2: #57606a;
  --text-3: #8c8c8c;
  --text-4: #b2b2b2;

  --bg: #ededed;
  --bg-2: #f7f7f7;
  --card: #ffffff;
  --line: #ebebeb;
  --line-2: #e2e2e2;

  --danger: #fa5151;
  --warn: #ff9f0a;
  --info: #10aeff;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  --shadow-1: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-3: 0 12px 40px rgba(0, 0, 0, 0.14);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --font: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

/**
 * 让 [hidden] 真的能隐藏元素。
 *
 * 浏览器对 [hidden] 的默认样式是 `display:none`，但它的优先级极低 ——
 * 只要元素自己带了 `display:flex` 之类的作者样式（比如 .actionbar、.grid），
 * 就会被盖掉，JS 里 `el.hidden = true` 看着生效、实际元素还显示着。
 * 这里显式加一条 !important 规则兜住，全站统一，页面就不用各自绕过了。
 */
[hidden] {
  display: none !important;
}

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

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

.page {
  min-height: 100vh;
  padding-bottom: calc(24px + var(--safe-bottom));
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 12px;
}

.wrap--narrow {
  max-width: 560px;
}

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

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

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

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

.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.center { text-align: center; }

/* ---------- 顶部导航 ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 12px;
  padding-top: var(--safe-top);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.navbar__title {
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navbar__side {
  min-width: 60px;
  font-size: 15px;
  color: var(--wx-blue);
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar__side--right {
  justify-content: flex-end;
}

.navbar__side--plain {
  color: var(--text-2);
}

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

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.card + .card {
  margin-top: 12px;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 15px;
}

.card__body {
  padding: 16px;
}

.card__body--tight {
  padding: 12px;
}

.card__foot {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, background 0.15s;
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: scale(0.985);
  opacity: 0.85;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--wx-green);
  color: #fff;
}

.btn--primary:active {
  background: var(--wx-green-dark);
}

.btn--ghost {
  background: #fff;
  border: 1px solid var(--line-2);
}

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

.btn--danger {
  background: #fff;
  color: var(--danger);
  border: 1px solid rgba(250, 81, 81, 0.35);
}

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

.btn--sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 6px;
}

.btn--xs {
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 6px;
}

.btn--icon {
  width: 44px;
  padding: 0;
}

/* 底部固定操作栏 */
.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  gap: 10px;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}

.actionbar .btn {
  flex: 1;
}

.has-actionbar {
  padding-bottom: calc(78px + var(--safe-bottom));
}

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

.field {
  margin-bottom: 14px;
}

.field:last-child {
  margin-bottom: 0;
}

.field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 6px;
}

.field__hint {
  font-size: 12px;
  color: var(--text-4);
}

.input,
.textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-size: 15px;
}

.input:focus,
.textarea:focus {
  border-color: var(--wx-green);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.12);
}

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

.textarea--sm {
  min-height: 62px;
}

.counter {
  font-size: 12px;
  color: var(--text-4);
  font-variant-numeric: tabular-nums;
}

.counter--warn {
  color: var(--warn);
}

/* 图片上传区 */
.uploader {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.uploader__item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-2);
}

.uploader__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.uploader__del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.uploader__cover {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(7, 193, 96, 0.92);
  color: #fff;
  font-size: 11px;
}

.uploader__add {
  aspect-ratio: 1;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-4);
  font-size: 12px;
  cursor: pointer;
}

.uploader__add:active {
  background: #eee;
}

.uploader__plus {
  font-size: 26px;
  line-height: 1;
  color: var(--text-4);
}

/* ---------- 朋友圈内容卡片（核心视觉） ---------- */

.moment {
  background: #fff;
  padding: 16px 14px 14px;
}

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

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-2);
  flex: 0 0 auto;
}

.avatar--round {
  border-radius: 50%;
}

.avatar--sm {
  width: 32px;
  height: 32px;
  border-radius: 5px;
}

.avatar--xs {
  width: 26px;
  height: 26px;
  border-radius: 4px;
}

.avatar--lg {
  width: 64px;
  height: 64px;
  border-radius: 10px;
}

.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dfe6ea, #c9d3d9);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  flex: 0 0 auto;
}

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

.moment__author {
  font-size: 16px;
  font-weight: 600;
  color: var(--wx-blue);
  line-height: 1.3;
}

.moment__title {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.42;
  color: var(--text);
  white-space: pre-wrap;
}

.moment__text {
  margin-top: 5px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.moment__text--clamp {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.moment__expand {
  margin-top: 6px;
  font-size: 15px;
  color: var(--wx-blue);
  cursor: pointer;
}

/* 九宫格图片 */
.grid {
  margin-top: 8px;
  display: grid;
  gap: 4px;
}

.grid--1 {
  grid-template-columns: 1fr;
  max-width: 62%;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 68%;
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 68%;
}

.grid__item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-2);
  cursor: zoom-in;
}

.grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.grid--1 .grid__item {
  aspect-ratio: auto;
}

.grid--1 .grid__item img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  background: var(--bg-2);
}

.grid__item--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f2f2f2 25%, #e9e9e9 37%, #f2f2f2 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* 位置 / 时间行 */
.moment__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-4);
}

.moment__location {
  color: var(--wx-blue);
}

.moment__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.moment__action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 8px;
  border: none;
  border-radius: 4px;
  background: var(--bg-2);
  color: var(--text-3);
  font-size: 12px;
  cursor: pointer;
}

.moment__action:active {
  background: #eaeaea;
}

/* 互动区（点赞 / 评论样式） */
.interact {
  margin-top: 10px;
  border-radius: 6px;
  background: var(--bg-2);
  overflow: hidden;
}

.interact__row {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.45;
}

.interact__row + .interact__row {
  border-top: 1px solid var(--line);
}

.interact__label {
  color: var(--wx-blue);
  flex: 0 0 auto;
  font-weight: 500;
}

.interact__name {
  color: var(--wx-blue);
}

.interact__text {
  color: var(--text);
  min-width: 0;
}

/* ---------- 通用小部件 ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  font-size: 12px;
  background: var(--bg-2);
  color: var(--text-2);
  white-space: nowrap;
}

.tag--green { background: var(--wx-green-soft); color: var(--wx-green-dark); }
.tag--blue { background: var(--wx-blue-soft); color: var(--wx-blue); }
.tag--warn { background: #fff5e5; color: #c77700; }
.tag--danger { background: #ffecec; color: var(--danger); }
.tag--gray { background: #f0f0f0; color: var(--text-3); }

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  padding: 12px 4px;
}

.stat__num {
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat__label {
  font-size: 12px;
  color: var(--text-3);
}

.stats {
  display: flex;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.stats .stat + .stat {
  border-left: 1px solid var(--line);
}

.stat--green .stat__num { color: var(--wx-green); }
.stat--blue .stat__num { color: var(--wx-blue); }
.stat--warn .stat__num { color: var(--warn); }

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

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-4);
  font-size: 14px;
}

.empty__icon {
  font-size: 40px;
  margin-bottom: 10px;
  opacity: 0.5;
}

.alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.55;
}

.alert--info { background: var(--wx-blue-soft); color: #3c4f75; }
.alert--warn { background: #fff7e6; color: #8a5a00; }
.alert--danger { background: #ffecec; color: #a52a2a; }
.alert--success { background: var(--wx-green-soft); color: #0a6b3d; }

.alert__title {
  font-weight: 600;
  margin-bottom: 4px;
}

.kv {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}

.kv:last-child {
  border-bottom: none;
}

.kv__k {
  flex: 0 0 84px;
  color: var(--text-3);
  font-size: 13px;
}

.kv__v {
  flex: 1;
  min-width: 0;
  word-break: break-all;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

/* ---------- 访客列表 ---------- */

.visitor {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.visitor:last-child {
  border-bottom: none;
}

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

.visitor__top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.visitor__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.visitor__time {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 3px;
}

.visitor__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.visitor__first {
  color: var(--wx-green);
  font-weight: 500;
}

/* ---------- 作品列表 ---------- */

.work {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.work:last-child {
  border-bottom: none;
}

.work__cover {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-2);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
  font-size: 22px;
}

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

.work__title {
  font-size: 15.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work__excerpt {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work__stats {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-3);
}

.work__avatars {
  display: flex;
  align-items: center;
}

.work__avatars .avatar {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1.5px solid #fff;
  margin-left: -6px;
}

.work__avatars .avatar:first-child {
  margin-left: 0;
}

/* ---------- 弹层 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal__panel {
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 18px calc(20px + var(--safe-bottom));
  transform: translateY(24px);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal.is-open .modal__panel {
  transform: translateY(0);
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal__title {
  font-size: 17px;
  font-weight: 600;
}

.modal__close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--text-3);
  font-size: 17px;
  cursor: pointer;
}

/* 居中弹窗（图片预览等） */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: 100vw;
  max-height: 88vh;
  object-fit: contain;
}

.lightbox__bar {
  position: absolute;
  top: var(--safe-top);
  right: 0;
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  opacity: 0.85;
}

.lightbox__counter {
  position: absolute;
  bottom: calc(20px + var(--safe-bottom));
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
}

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

.toast-host {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(var(--safe-top) + 58px);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: 84vw;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  animation: toast-in 0.24s ease;
  box-shadow: var(--shadow-2);
}

.toast--success { background: rgba(7, 160, 84, 0.94); }
.toast--error { background: rgba(214, 48, 48, 0.94); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 加载 ---------- */

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-top-color: var(--wx-green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner--light {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

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

.loading-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 0;
  color: var(--text-3);
  font-size: 14px;
}

/* ---------- 开关 ---------- */

.switch {
  position: relative;
  width: 46px;
  height: 27px;
  flex: 0 0 auto;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch__slider {
  position: absolute;
  inset: 0;
  background: #dcdcdc;
  border-radius: 14px;
  transition: background 0.2s;
  cursor: pointer;
}

.switch__slider::before {
  content: '';
  position: absolute;
  width: 23px;
  height: 23px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .switch__slider {
  background: var(--wx-green);
}

.switch input:checked + .switch__slider::before {
  transform: translateX(19px);
}

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

.hero {
  padding: 34px 20px 26px;
  text-align: center;
  background: linear-gradient(160deg, #ffffff 0%, #f3fbf6 60%, #e9f7f0 100%);
}

.hero__logo {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 20px;
  background: var(--wx-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 8px 24px rgba(7, 193, 96, 0.28);
  object-fit: cover;
  overflow: hidden;
}

.hero__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.hero__sub {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.65;
}

.feature {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.feature:last-child {
  border-bottom: none;
}

.feature__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--wx-green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: 0 0 auto;
}

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

.feature__desc {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 2px;
  line-height: 1.55;
}

/* ---------- 预览切换 ---------- */

.segmented {
  display: flex;
  padding: 3px;
  border-radius: 8px;
  background: var(--bg-2);
  gap: 3px;
}

.segmented__item {
  flex: 1;
  text-align: center;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: transparent;
  /* 窄屏下「待支付」「已关闭」这类三字标签会换行，撑高整条筛选栏 */
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.segmented__item.is-active {
  background: #fff;
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* 手机预览外框 */
.phone {
  border-radius: 22px;
  background: #f6f6f6;
  border: 1px solid var(--line-2);
  padding: 10px 0;
  overflow: hidden;
}

.phone__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0 10px;
  font-size: 12px;
  color: var(--text-4);
}

/* ---------- 分享弹层 ---------- */

.share-box {
  text-align: center;
}

.share-box__qr {
  width: 168px;
  height: 168px;
  margin: 0 auto 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px;
}

.share-box__qr img,
.share-box__qr svg {
  width: 100%;
  height: 100%;
  display: block;
}

.share-box__link {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--bg-2);
  font-size: 13px;
  color: var(--text-2);
  text-align: left;
  word-break: break-all;
}

.share-box__card {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-top: 12px;
}

.share-steps {
  text-align: left;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: s;
}

.share-steps li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 9px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.6;
  counter-increment: s;
}

.share-steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--wx-green);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* ---------- 底部提示 ---------- */

.footer-note {
  padding: 20px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-4);
  line-height: 1.7;
}

.footer-note a {
  color: var(--text-3);
}

/* 微信外打开提示 */
.wechat-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: #fff8e6;
  color: #8a5a00;
  font-size: 13px;
  line-height: 1.6;
}

/* 悬浮「后台」入口 */
.fab {
  position: fixed;
  right: 14px;
  bottom: calc(20px + var(--safe-bottom));
  z-index: 80;
  height: 42px;
  padding: 0 16px;
  border-radius: 21px;
  border: none;
  background: rgba(25, 25, 25, 0.86);
  color: #fff;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-2);
  cursor: pointer;
}

/* ---------- 二维码 / 图片长按保存 ---------- */

.saveable {
  -webkit-touch-callout: default;
}

/* ---------- 深色模式（跟随系统） ---------- */

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8e8e8;
    --text-2: #b8b8b8;
    --text-3: #909090;
    --text-4: #6e6e6e;
    --bg: #111111;
    --bg-2: #1e1e1e;
    --card: #1c1c1c;
    --line: #2a2a2a;
    --line-2: #333333;
    --wx-green-soft: #12301f;
    --wx-blue-soft: #1a2233;
    --shadow-1: 0 1px 3px rgba(0, 0, 0, 0.4);
  }

  .navbar {
    background: rgba(28, 28, 28, 0.94);
  }

  .actionbar {
    background: rgba(28, 28, 28, 0.96);
  }

  .moment {
    background: #1c1c1c;
  }

  .btn--ghost {
    background: #1c1c1c;
  }

  .hero {
    background: linear-gradient(160deg, #1c1c1c 0%, #16241c 60%, #12211a 100%);
  }

  .phone {
    background: #161616;
  }

  .modal__panel {
    background: #1c1c1c;
  }
}
