/* ═══════════════════════════════════════════════
   私藏 · 私人动态 H5 · 暗夜金主题
   ═══════════════════════════════════════════════ */

:root {
  --bg:            #0b0907;
  --bg-soft:       #12100c;
  --card:          #17130f;
  --card-2:        #1d1813;
  --card-brd:      rgba(255, 244, 222, .07);
  --ink:           #f1ebdf;
  --ink-2:         #a89d89;
  --ink-3:         #6e6555;
  --gold-1:        #f6e3b8;
  --gold-2:        #e3c285;
  --gold-3:        #c69d5b;
  --gold-grad:     linear-gradient(135deg, #f6e3b8, #e3c285 48%, #c99f5c);
  --accent:        #e3c285;
  --accent-soft:   rgba(227, 194, 133, .12);
  --green:         #1fc765;
  --line:          rgba(255, 244, 222, .07);
  --radius:        18px;
  --radius-sm:     12px;
  --shadow:        0 10px 34px rgba(0, 0, 0, .35);
  --shadow-lg:     0 22px 60px rgba(0, 0, 0, .5);
  --font:          "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --safe-b:        env(safe-area-inset-bottom, 0px);
  --safe-t:        env(safe-area-inset-top, 0px);
}

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

html { height: 100%; }

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

body {
  background-image:
    radial-gradient(1100px 480px at 50% -12%, rgba(227, 194, 133, .09) 0%, rgba(227,194,133,0) 62%),
    radial-gradient(700px 420px at 108% 22%, rgba(120, 90, 40, .08) 0%, rgba(120,90,40,0) 55%);
  background-attachment: fixed;
}

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

button { cursor: pointer; border: none; background: none; padding: 0; }
img { display: block; }
[hidden] { display: none !important; }

::selection { background: rgba(227, 194, 133, .28); }

::-webkit-scrollbar { width: 0; height: 0; }


/* ═══════ 锁屏 ═══════ */

.gate {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px calc(32px + var(--safe-b));
  overflow: hidden;
  z-index: 60;
  transition: opacity .5s ease, transform .5s ease;
}

.gate.is-leaving { opacity: 0; transform: scale(1.04); pointer-events: none; }

.gate__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.gate__glow--a {
  width: 340px; height: 340px;
  background: rgba(227, 194, 133, .13);
  top: -100px; left: -80px;
}
.gate__glow--b {
  width: 320px; height: 320px;
  background: rgba(31, 199, 101, .07);
  bottom: -110px; right: -90px;
}

.gate__card {
  position: relative;
  width: 100%;
  max-width: 340px;
  padding: 38px 26px 30px;
  border-radius: 26px;
  background: rgba(26, 21, 16, .82);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  border: 1px solid rgba(246, 227, 184, .12);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.gate__logo {
  width: 62px; height: 62px;
  margin: 0 auto 18px;
  border-radius: 20px;
  background: var(--gold-grad);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(227, 194, 133, .22), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.gate__logo svg { width: 32px; height: 32px; fill: #241a08; }
.gate__logo:active { transform: scale(.92); }

.gate__title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .12em;
  text-indent: .12em;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gate__sub {
  margin: 0 0 26px;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: .02em;
  transition: color .3s;
}
.gate.is-admin .gate__sub { color: var(--accent); font-weight: 600; }

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

.gate__field { position: relative; }

.gate__input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 244, 222, .1);
  background: rgba(255, 255, 255, .045);
  color: var(--ink);
  font-size: 16px;
  letter-spacing: .06em;
  outline: none;
  transition: border-color .22s, box-shadow .22s, background .22s;
  text-align: center;
}
.gate__input::placeholder { color: var(--ink-3); letter-spacing: 0; font-size: 14px; }
.gate__input:focus {
  border-color: rgba(227, 194, 133, .55);
  background: rgba(255, 255, 255, .07);
  box-shadow: 0 0 0 4px rgba(227, 194, 133, .1);
}

.gate__btn {
  position: relative;
  height: 50px;
  border-radius: 14px;
  background: var(--gold-grad);
  color: #241a08;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-indent: .16em;
  box-shadow: 0 8px 22px rgba(227, 194, 133, .2), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .18s, box-shadow .18s, opacity .18s;
  overflow: hidden;
}
.gate__btn:active { transform: scale(.975); box-shadow: 0 4px 12px rgba(227,194,133,.16); }
.gate__btn[disabled] { opacity: .7; pointer-events: none; }

.gate__spinner {
  display: none;
  position: absolute;
  top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(36, 26, 8, .3);
  border-top-color: #241a08;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.gate__btn.is-loading .gate__btnText { visibility: hidden; }
.gate__btn.is-loading .gate__spinner { display: block; }

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

.gate__error {
  min-height: 18px;
  margin: 14px 0 0;
  font-size: 12.5px;
  color: #e0685a;
  opacity: 0;
  transition: opacity .2s;
}
.gate__error.is-on { opacity: 1; }

.gate__card.is-shake { animation: shake .42s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

.gate__foot {
  position: relative;
  margin: 26px 0 0;
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .04em;
}


/* ═══════ 主界面 ═══════ */

.app {
  min-height: 100vh;
  max-width: 520px;
  margin: 0 auto;
  padding-top: var(--safe-t);
  animation: fadeUp .5s ease both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }

@media (min-width: 560px) {
  .app {
    box-shadow: 0 0 0 1px rgba(255, 244, 222, .05), 0 30px 90px rgba(0, 0, 0, .6);
    background: rgba(13, 11, 8, .6);
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 18px;
  background: rgba(11, 9, 7, .74);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid rgba(255, 244, 222, .05);
}

.topbar__brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .18em;
  text-indent: .18em;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.topbar__tools { display: flex; gap: 6px; }

.iconBtn {
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 244, 222, .08);
  transition: background .18s, color .18s;
}
.iconBtn:active { background: rgba(255, 255, 255, .1); }
.iconBtn.is-admin {
  color: #241a08;
  background: var(--gold-grad);
  border-color: transparent;
  font-weight: 600;
}

.scroll { padding: 16px 14px calc(100px + var(--safe-b)); }


/* ═══════ 主页头（创作者风格） ═══════ */

.hero {
  position: relative;
  padding: 14px 18px 18px;
  margin-bottom: 14px;
}

.hero__row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.hero__avatar {
  flex: none;
  width: 76px; height: 76px;
  border-radius: 22px;
  background: var(--gold-grad);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45), 0 0 0 1px rgba(246, 227, 184, .18);
  position: relative;
  overflow: hidden;
}
.hero__avatarFallback { color: #241a08; font-size: 28px; font-weight: 700; }
.hero__avatar.has-img .hero__avatarFallback { display: none; }

.hero__id { flex: 1; min-width: 0; padding-top: 4px; }

.hero__nameRow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero__name {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--ink);
}

.hero__badge {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--gold-2);
  background: rgba(227, 194, 133, .1);
  border: 1px solid rgba(227, 194, 133, .22);
}

.hero__sig {
  margin: 7px 0 0;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero__stats {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 16px;
  padding: 0 2px;
}

.hero__stat { display: flex; align-items: baseline; gap: 5px; }
.hero__stat b { font-size: 16px; font-weight: 800; color: var(--ink); font-style: normal; }
.hero__stat span { font-size: 11.5px; color: var(--ink-3); }


/* ═══════ 筛选胶囊 ═══════ */

.chips {
  display: flex;
  gap: 8px;
  padding: 2px 2px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 244, 222, .08);
  transition: background .18s, color .18s, border-color .18s, transform .12s;
}
.chip:active { transform: scale(.95); }
.chip.is-on {
  color: #241a08;
  background: var(--gold-grad);
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(227, 194, 133, .18);
}


/* ═══════ 动态卡片 ═══════ */

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

.post {
  position: relative;
  display: flex;
  gap: 11px;
  padding: 16px 16px 14px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-brd);
  box-shadow: var(--shadow);
  animation: postIn .45s cubic-bezier(.22,.9,.3,1) both;
}
@keyframes postIn { from { opacity: 0; transform: translateY(16px); } }

.post.is-removing { animation: postOut .3s ease forwards; }
@keyframes postOut { to { opacity: 0; transform: scale(.94); } }

.post__avatar {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--gold-grad);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  color: #241a08;
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
}

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

/* 头部：昵称 + 时间·类型 */
.post__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.post__headInfo { min-width: 0; }

.post__name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.post__meta {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
  letter-spacing: .02em;
}

.post__text {
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 2px;
}

/* 操作栏：喜欢 · 评论 · 分享 · 收藏 */
.post__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 13px;
}

.post__action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #8a8071;
  transition: color .16s, transform .12s;
}
.post__action:active { transform: scale(.92); }
.post__action svg {
  width: 14.5px; height: 14.5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.post__action.is-on { color: var(--gold-2); }
.post__action.is-on svg { fill: currentColor; }

.post__actionDot {
  flex: none;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(255, 244, 222, .16);
}

.post__more {
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
  color: var(--ink-3);
  letter-spacing: .08em;
  transition: background .18s, color .18s;
}
.post__more:active { background: rgba(255, 255, 255, .08); color: var(--ink); }


/* ═══════ 媒体 ═══════ */

.grid {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}
.grid--1 { grid-template-columns: 1fr; justify-items: start; }
.grid--2 { grid-template-columns: repeat(2, 1fr); max-width: 74%; }
.grid--4 { grid-template-columns: repeat(2, 1fr); max-width: 74%; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.cell {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 244, 222, .05);
  width: 100%;
  padding: 0;
  transition: transform .2s;
  animation: cellIn .35s ease both;
}
@keyframes cellIn { from { opacity: 0; transform: scale(.94); } }

.cell--square { aspect-ratio: 1 / 1; }
.cell--single { aspect-ratio: auto; max-width: 74%; min-width: 110px; }

.cell img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 单图不裁切，按原始比例完整显示 */
.cell--single img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 12px;
}

.cell:active { transform: scale(.975); }

.cell__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-size: 12px;
}

.videoBox {
  position: relative;
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  line-height: 0;
  border: 1px solid rgba(255, 244, 222, .06);
}
.videoBox video {
  width: 100%;
  max-height: 400px;
  display: block;
  background: #000;
}
.videoBadge {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--gold-2);
  background: rgba(0, 0, 0, .6);
  border: 1px solid rgba(227, 194, 133, .3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}


/* ═══════ 加载态 ═══════ */

.feedState {
  padding: 26px 0 8px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
  min-height: 20px;
}
.feedState__dots { display: inline-flex; gap: 5px; }
.feedState__dots i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold-3);
  animation: bounce 1.1s infinite ease-in-out;
}
.feedState__dots i:nth-child(2) { animation-delay: .16s; }
.feedState__dots i:nth-child(3) { animation-delay: .32s; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(.6); opacity: .4; }
  40% { transform: scale(1); opacity: 1; }
}

.empty {
  padding: 60px 28px;
  text-align: center;
  color: var(--ink-3);
}
.empty__icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 244, 222, .07);
  display: grid;
  place-items: center;
}
.empty__icon svg { width: 26px; height: 26px; stroke: var(--gold-3); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.empty__title { font-size: 14.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.empty__text { font-size: 12.5px; line-height: 1.7; }


/* ═══════ 悬浮按钮 ═══════ */

.fab {
  position: fixed;
  right: max(18px, calc(50% - 260px + 18px));
  bottom: calc(24px + var(--safe-b));
  z-index: 35;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--gold-grad);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(227, 194, 133, .3), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1);
  animation: fabIn .4s cubic-bezier(.34,1.56,.64,1) both;
}
.fab svg { width: 24px; height: 24px; stroke: #241a08; stroke-width: 2.4; fill: none; stroke-linecap: round; }
.fab:active { transform: scale(.9); }
@keyframes fabIn { from { opacity: 0; transform: scale(.4); } }


/* ═══════ 抽屉 ═══════ */

.sheet { position: fixed; inset: 0; z-index: 50; }

.sheet__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade .28s ease both;
}
@keyframes fade { from { opacity: 0; } }

.sheet__panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #14100c;
  border-top: 1px solid rgba(246, 227, 184, .1);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 46px rgba(0, 0, 0, .55);
  animation: sheetUp .34s cubic-bezier(.22,.9,.3,1) both;
  overflow: hidden;
}
@keyframes sheetUp { from { transform: translate(-50%, 100%); } }

.sheet.is-closing .sheet__panel { animation: sheetDown .26s ease forwards; }
.sheet.is-closing .sheet__mask { animation: fadeOut .26s ease forwards; }
@keyframes sheetDown { to { transform: translate(-50%, 100%); } }
@keyframes fadeOut { to { opacity: 0; } }

.sheet__head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
}
.sheet__title { font-size: 14.5px; font-weight: 600; }
.sheet__cancel, .sheet__done {
  font-size: 14px;
  padding: 6px 4px;
  color: var(--ink-2);
}
.sheet__done { color: var(--accent); font-weight: 600; }
.sheet__done[disabled] { color: var(--ink-3); pointer-events: none; }

.sheet__body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 18px calc(28px + var(--safe-b));
}


/* ═══════ 编辑器 ═══════ */

.editor__text {
  width: 100%;
  min-height: 118px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1.5px solid rgba(255, 244, 222, .09);
  background: rgba(255, 255, 255, .04);
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.7;
  resize: none;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.editor__text:focus { border-color: rgba(227, 194, 133, .5); box-shadow: 0 0 0 4px rgba(227, 194, 133, .08); }
.editor__text::placeholder { color: var(--ink-3); }

.editor__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.editor__grid:empty { display: none; }

.thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 244, 222, .05);
  animation: cellIn .3s ease both;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__del {
  position: absolute;
  top: 5px; right: 5px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  transition: transform .16s;
}
.thumb__del:active { transform: scale(.85); }
.thumb__del svg { width: 11px; height: 11px; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; }

.thumb__busy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(20, 16, 12, .7);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.thumb__busy i {
  width: 18px; height: 18px;
  border: 2px solid rgba(227, 194, 133, .25);
  border-top-color: var(--gold-2);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.editor__actions { margin-top: 12px; }

.pickBtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 12px;
  font-size: 13.5px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 244, 222, .07);
  transition: background .18s;
}
.pickBtn:active { background: rgba(255, 255, 255, .09); }
.pickBtn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pickBtn em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.pickBtn[disabled] { opacity: .45; pointer-events: none; }

.editor__video { margin-top: 20px; }
.editor__label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.editor__label span {
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-3);
  padding: 1.5px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
}
.editor__input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 244, 222, .09);
  background: rgba(255, 255, 255, .04);
  color: var(--ink);
  font-size: 13.5px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.editor__input:focus { border-color: rgba(227, 194, 133, .5); box-shadow: 0 0 0 4px rgba(227, 194, 133, .08); }
.editor__input::placeholder { color: var(--ink-3); }
.editor__hint { margin: 8px 0 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }

/* 视频上传：已附加的条目 */
.editor__video .pickBtn { width: 100%; justify-content: center; }
.editor__input--video { margin-top: 10px; }

.videoAttach {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(227, 194, 133, .28);
  background: rgba(227, 194, 133, .07);
}
.videoAttach__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(227, 194, 133, .13);
  flex: none;
}
.videoAttach__icon svg { width: 17px; height: 17px; stroke: var(--gold-2); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.videoAttach__name { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.videoAttach__del {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 12px;
  padding: 6px 4px;
  cursor: pointer;
}
.videoAttach__del:active { color: #e88; }

/* 上传进度 / 状态提示 */
.editor__status {
  margin: 14px 0 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  font-size: 12px;
  color: var(--gold-2);
  text-align: center;
}


/* ═══════ 设置 ═══════ */

.setBlock {
  padding: 18px;
  border-radius: 18px;
  background: var(--card-2);
  border: 1px solid var(--card-brd);
  margin-bottom: 14px;
}
.setBlock--danger { background: rgba(224, 104, 90, .06); border-color: rgba(224, 104, 90, .18); }
.setBlock__title { margin: 0 0 12px; font-size: 13.5px; font-weight: 700; letter-spacing: .02em; }
.setBlock__hint { margin: 0 0 12px; font-size: 11.5px; color: var(--ink-3); line-height: 1.65; }
.setBlock__note { margin: 4px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }
.setBlock__note b { color: var(--accent); }

.setAvatar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.setAvatar__preview {
  flex: none;
  width: 64px; height: 64px;
  border-radius: 20px;
  background: var(--gold-grad);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  color: #241a08;
  font-size: 24px;
  font-weight: 700;
}
.setAvatar__preview.has-img span { display: none; }
.setAvatar__side { flex: 1; }
.setBlock__hint { margin: 6px 0 0; }

.miniBtn {
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #241a08;
  background: var(--gold-grad);
  transition: opacity .18s;
}
.miniBtn:active { opacity: .85; }

.field { display: block; margin-top: 12px; }
.field__label { display: block; font-size: 11.5px; color: var(--ink-3); margin-bottom: 6px; }
.field__input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1.5px solid rgba(255, 244, 222, .09);
  background: rgba(255, 255, 255, .04);
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field__input::placeholder { color: var(--ink-3); }
.field__input:focus { border-color: rgba(227, 194, 133, .5); background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 4px rgba(227, 194, 133, .08); }


/* ═══════ 图片查看器 ═══════ */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(5, 4, 3, .96);
  display: flex;
  flex-direction: column;
  animation: fade .26s ease both;
}

.viewer__bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(52px + var(--safe-t));
  padding: var(--safe-t) 16px 0;
}
.viewer__index { font-size: 13px; color: rgba(255,255,255,.6); letter-spacing: .06em; }
.viewer__close {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: grid;
  place-items: center;
  transition: background .18s;
}
.viewer__close:active { background: rgba(255,255,255,.24); }
.viewer__close svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 2; fill: none; stroke-linecap: round; }

.viewer__stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px calc(28px + var(--safe-b));
  overflow: auto;
}
.viewer__stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  transition: filter .35s, opacity .35s;
}
.viewer__stage img.is-loading { filter: blur(22px); transform: scale(1.02); }
.viewer__status {
  position: absolute;
  left: 50%;
  bottom: calc(30px + var(--safe-b));
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255,255,255,.6);
}


/* ═══════ 确认框 ═══════ */

.confirm { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 28px; }
.confirm__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade .22s ease both;
}
.confirm__box {
  position: relative;
  width: 100%;
  max-width: 300px;
  padding: 24px 22px 18px;
  border-radius: 20px;
  background: #1a1511;
  border: 1px solid rgba(246, 227, 184, .1);
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: pop .3s cubic-bezier(.34,1.4,.64,1) both;
}
@keyframes pop { from { opacity: 0; transform: scale(.9); } }
.confirm__title { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.confirm__text { margin: 0 0 20px; font-size: 13px; color: var(--ink-2); line-height: 1.65; }
.confirm__btns { display: flex; gap: 10px; }
.confirm__btn {
  flex: 1;
  height: 42px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .06);
  transition: background .18s;
}
.confirm__btn:active { background: rgba(255, 255, 255, .11); }
.confirm__btn--main { background: var(--gold-grad); color: #241a08; font-weight: 700; }
.confirm__btn--main:active { opacity: .85; }
.confirm__btn--danger { background: #c0392b; color: #fff; font-weight: 600; }


/* ═══════ 操作菜单 ═══════ */

.menu { position: fixed; inset: 0; z-index: 55; }
.menu__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fade .2s ease both;
}
.menu__panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  padding: 10px 10px calc(14px + var(--safe-b));
  background: #14100c;
  border-top: 1px solid rgba(246, 227, 184, .1);
  border-radius: 20px 20px 0 0;
  animation: sheetUp .26s ease both;
  box-shadow: 0 -10px 34px rgba(0, 0, 0, .5);
}
.menu__item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 13px;
  font-size: 14.5px;
  color: var(--ink);
  text-align: left;
  transition: background .16s;
}
.menu__item:active { background: rgba(255, 255, 255, .06); }
.menu__item--danger { color: #e0685a; }
.menu__item svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.menu__sep { height: 1px; background: var(--line); margin: 6px 14px; }


/* ═══════ Toast ═══════ */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + var(--safe-b));
  transform: translate(-50%, 12px);
  z-index: 90;
  max-width: min(86vw, 340px);
  padding: 11px 20px;
  border-radius: 13px;
  background: rgba(24, 19, 14, .94);
  border: 1px solid rgba(246, 227, 184, .16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .26s, transform .26s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }


/* ═══════ 加密动态 ═══════ */

.cell--locked,
.videoBox--locked {
  position: relative;
  overflow: hidden;
  display: block;
  padding: 0;
  border: 1px solid rgba(246, 227, 184, .1);
  background: #120e0a;
}

.cell--locked::after,
.videoBox--locked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 8, 5, .18), rgba(10, 8, 5, .42));
  pointer-events: none;
}

.cell--locked img.is-blur,
.videoBox--locked img.is-blur,
.videoBox--locked video.is-blur {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(7px) saturate(115%);
  transform: scale(1.06);
  display: block;
}

.videoBox--locked { width: 100%; margin-top: 10px; border-radius: 14px; line-height: 0; aspect-ratio: 16 / 10; }
.videoBox--locked img.is-blur,
.videoBox--locked video.is-blur { max-height: none; }

.lockedPh {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(227, 194, 133, .08), rgba(0, 0, 0, 0) 60%),
    #16110c;
}
.lockedPh svg { width: 26px; height: 26px; fill: none; stroke: rgba(227, 194, 133, .5); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lockedPh--wide { position: absolute; inset: 0; }

.lockPill {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  color: #f3ddb0;
  background: rgba(20, 15, 10, .72);
  border: 1px solid rgba(227, 194, 133, .34);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
}
.lockPill svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* 加密视频中央按钮组：试看3秒 + 密码解锁 */
.lockPills {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  gap: 8px;
}
.lockPills .lockPill {
  position: static;
  transform: none;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}
.lockPills .lockPill:active { transform: scale(.96); }

.lockedBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(227, 194, 133, .1), rgba(227, 194, 133, .03));
  border: 1px solid rgba(227, 194, 133, .2);
}
.lockedBar__info { min-width: 0; }
.lockedBar__info b { display: block; font-size: 13px; color: var(--gold-1); }
.lockedBar__info span { display: block; font-size: 11px; color: var(--ink-3); margin-top: 3px; }

.lockedBar__btn {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: #241a08;
  background: var(--gold-grad);
  box-shadow: 0 5px 16px rgba(227, 194, 133, .22);
  transition: transform .16s, opacity .16s;
}
.lockedBar__btn:active { transform: scale(.95); opacity: .9; }


/* ═══════ 加密开关 ═══════ */

.editor__lock { margin-top: 18px; }

.switchRow {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  text-align: left;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 244, 222, .08);
  transition: border-color .2s, background .2s;
}
.switchRow__icon {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .05);
}
.switchRow__icon svg { width: 17px; height: 17px; fill: none; stroke: var(--ink-3); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }

.switchRow__text { flex: 1; min-width: 0; }
.switchRow__text b { display: block; font-size: 13.5px; font-weight: 600; }
.switchRow__text em { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.5; }

.switch {
  flex: none;
  position: relative;
  width: 46px; height: 27px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  transition: background .22s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: #cfc6b4;
  transition: transform .22s cubic-bezier(.34,1.4,.64,1), background .22s;
}
.switch.is-on { background: rgba(227, 194, 133, .32); }
.switch.is-on::after { transform: translateX(19px); background: #f6e3b8; }

.switchRow:has(.switch.is-on) {
  background: rgba(227, 194, 133, .07);
  border-color: rgba(227, 194, 133, .28);
}
.switchRow:has(.switch.is-on) .switchRow__icon svg { stroke: var(--gold-2); }

.lockField { margin-top: 14px; }
.lockField .editor__input { margin-top: 0; }


/* ═══════ 解锁面板 ═══════ */

.sheet__panel--auto { max-height: 92vh; }
.sheet__ph { width: 30px; }

.unlock__hero { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }

.unlock__thumb {
  flex: none;
  width: 74px; height: 74px;
  border-radius: 18px;
  background: #16110c;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(246, 227, 184, .12);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.unlock__thumb.has-img .unlock__lockIcon { display: none; }
.unlock__lockIcon {
  width: 26px; height: 26px;
  fill: none;
  stroke: rgba(227, 194, 133, .5);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.unlock__text { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }

.unlock__input { text-align: center; letter-spacing: .08em; height: 48px; }

.unlock__btn {
  position: relative;
  width: 100%;
  height: 48px;
  margin-top: 14px;
  border-radius: 14px;
  background: var(--gold-grad);
  color: #241a08;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1em;
  box-shadow: 0 8px 22px rgba(227, 194, 133, .2), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .18s, opacity .18s;
  overflow: hidden;
}
.unlock__btn:active { transform: scale(.98); opacity: .92; }

.unlock__spinner {
  display: none;
  position: absolute;
  top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(36, 26, 8, .3);
  border-top-color: #241a08;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.unlock__btn.is-loading .unlock__btnText { visibility: hidden; }
.unlock__btn.is-loading .unlock__spinner { display: block; }

.unlock__error {
  min-height: 17px;
  margin: 12px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: #e0685a;
  opacity: 0;
  transition: opacity .2s;
}
.unlock__error.is-on { opacity: 1; }


/* ═══════ 小屏适配 ═══════ */

@media (max-width: 360px) {
  .scroll { padding-left: 11px; padding-right: 11px; }
  .post { padding: 14px 13px 12px; }
  .post__text { font-size: 14.5px; }
  .hero__stats { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
