/* 燕云社区 · production light UI */
:root {
  --bg: #f5f5f5;
  --card: #ffffff;
  --text: #111111;
  --muted: #8a8a8a;
  --line: #efefef;
  --red: #ff2442;
  --orange: #f07828;
  --gold: #e8b03a;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --shell-max: 960px;
  --tabbar-h: 56px;
  --beian-h: calc(0.42rem + 0.66rem * 1.4);
  --top-h: 48px;
  --radius: 12px;
  --sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --pink: var(--red);
  --lilac: var(--text);
  --danger: #e34545;
  --ok: #2f9b63;
  --shadow: 0 1px 3px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; }
html {
  margin: 0;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: manipulation;
}
body { margin: 0; min-height: 100%; }
html:has(body.app-shell) {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}
img, video, canvas, svg { max-width: 100%; height: auto; }
.card-media img, .mini-av-img, .user-avatar, .preview-box img, .avatar-preview, img.chat-av { max-width: none; height: 100%; }
body.app-shell {
  font-family: var(--sans);
  color: var(--text);
  background: #e8e8e8;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  height: 100%;
  height: 100dvh;
}
.blob { display: none !important; }

/* Responsive app shell: full-bleed on phone, wider centered column on pad/desktop */
.phone-frame {
  width: 100%;
  max-width: var(--shell-max);
  min-width: 0;
  height: var(--vv-height, 100dvh);
  max-height: var(--vv-height, 100dvh);
  margin: 0 auto;
  background: var(--bg);
  position: fixed;
  left: 0;
  right: 0;
  top: var(--vv-offset, 0px);
  display: flex;
  flex-direction: column;
  box-shadow: none;
  padding-top: var(--safe-top);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  box-sizing: border-box;
  overflow: hidden;
}
body.kb-open .app-tabbar {
  display: none !important;
}
@media (min-width: 640px) {
  body.app-shell { background: #e8e8e8; }
  .phone-frame {
    box-shadow: 0 0 0 1px rgba(0,0,0,0.04), 0 12px 40px rgba(0,0,0,0.08);
  }
}
@media (min-width: 900px) {
  .phone-frame { max-width: 960px; }
}
@media (min-width: 640px) and (max-width: 899px) {
  .phone-frame { max-width: 720px; }
}

/* Top bar */
.app-top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 0.3rem;
  min-height: calc(var(--top-h) + var(--safe-top));
  height: auto;
  padding: var(--safe-top) 0.55rem 0 0.4rem;
  background: #fff; border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.app-top > * { margin-top: 0; }
.app-top .top-tabs,
.app-top .icon-btn,
.app-top .user-slot {
  height: var(--top-h);
  display: flex;
  align-items: center;
}
.app-top .icon-btn,
.icon-btn {
  width: 2rem; height: 2rem; border: none; background: transparent;
  cursor: pointer; display: grid; place-items: center; flex: 0 0 auto;
  padding: 0; border-radius: 8px; color: #222;
}
.icon-btn:active { background: #f3f3f3; }
.ico-search, .ico-plus {
  display: block; width: 18px; height: 18px; position: relative;
}
.ico-search {
  border: 1.6px solid #222; border-radius: 50%; width: 14px; height: 14px;
}
.ico-search::after {
  content: ""; position: absolute; width: 6px; height: 1.6px; background: #222;
  right: -3px; bottom: -1px; transform: rotate(45deg); border-radius: 1px;
}
.ico-plus::before, .ico-plus::after {
  content: ""; position: absolute; background: #222; border-radius: 1px;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.ico-plus::before { width: 14px; height: 1.8px; }
.ico-plus::after { width: 1.8px; height: 14px; }


.top-tabs {
  flex: 1; min-width: 0; display: flex; align-items: flex-end; justify-content: center;
  gap: 0.75rem; padding: 0 0.15rem; height: 100%;
}
.top-tab {
  text-decoration: none; color: #666; font-size: 0.95rem; font-weight: 600;
  padding: 0.7rem 0.05rem 0.45rem; border-bottom: 3px solid transparent;
  white-space: nowrap; line-height: 1;
}
.top-tab.is-active {
  color: #111; font-weight: 900; border-bottom-color: #111;
}
.top-brand {
  text-decoration: none; color: #1a1a1a; font-weight: 900; font-size: 0.88rem;
  white-space: nowrap; padding: 0.55rem 0 0.5rem;
  letter-spacing: 0.02em;
  font-family: "STKaiti", "KaiTi", "Noto Serif SC", serif;
}
.user-slot {
  display: flex; align-items: center; gap: 0.3rem; margin-left: 0.1rem; max-width: 5.5rem;
}
.user-name {
  font-size: 0.7rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-avatar { width: 1.4rem; height: 1.4rem; border-radius: 50%; object-fit: cover; }
a.btn-register, .ghost, .primary {
  font-family: inherit; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.35rem 0.65rem; border-radius: 999px; font-weight: 800; font-size: 0.72rem;
  border: 1px solid transparent; min-height: 1.7rem;
}
.primary { background: #111; color: #fff; }
.ghost { background: #fff; color: #666; border-color: #e5e5e5; }
a.btn-register { background: #fff; color: #111; border-color: #e5e5e5; padding: 0.3rem 0.55rem; }

.app-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  padding: 0.55rem clamp(0.45rem, 1.6vw, 1rem) 0.85rem;
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 0;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

/* Promo strip — three equal cards fill shell width */
.promo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  padding: 0.1rem 0 0.65rem;
  box-sizing: border-box;
}
.promo-card {
  min-width: 0; width: 100%; max-width: none; min-height: 78px;
  border-radius: var(--radius); padding: 0.65rem 0.7rem; color: #fff;
  text-decoration: none; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden; box-sizing: border-box;
}
.promo-kicker { font-size: 0.66rem; opacity: 0.92; font-weight: 600; }
.promo-card strong {
  font-size: 0.98rem; font-weight: 900; line-height: 1.25; margin: 0.12rem 0 0.35rem;
}
.promo-go {
  align-self: flex-start; font-size: 0.64rem; font-weight: 700;
  padding: 0.18rem 0.55rem; border-radius: 999px;
  background: rgba(255,255,255,0.22); border: 1px solid rgba(255,255,255,0.28);
}
.promo-gold { background: linear-gradient(145deg, #f3c85a, #d99a2a 55%, #c47f18); }
.promo-orange { background: linear-gradient(145deg, #ff9f55, #f07828 52%, #e45a1c); }
.promo-brown { background: linear-gradient(145deg, #9a8f86, #6f6762 55%, #4a4542); }

/* Sub tabs */
.sub-tabs {
  display: flex; gap: 0.05rem; overflow-x: auto; padding: 0.05rem 0.05rem 0.5rem;
  margin-bottom: 0.25rem;
}
.sub-tabs::-webkit-scrollbar { display: none; }
.sub-tab {
  flex: 0 0 auto; border: none; background: transparent; cursor: pointer;
  text-decoration: none; color: #888; font-weight: 600; font-size: 0.92rem;
  padding: 0.3rem 0.65rem; font-family: inherit;
}
.sub-tab.is-on { color: #111; font-weight: 900; }

/* Category row + search / compose / avatar */
.feed-toolbar {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  margin: 0 0 0.15rem;
  padding: 0.05rem 0 0.35rem;
}
.feed-toolbar .sub-tabs {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
  padding: 0.05rem 0 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.feed-toolbar-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.02rem;
  padding-left: 0.05rem;
}
/* 20261116z-local: pin search at the far right of the community category row */
.feed-toolbar .feed-toolbar-actions {
  padding: 0 0.25rem 0 0.1rem;
}
.feed-toolbar #btn-search {
  flex: 0 0 auto;
}
.feed-toolbar-actions .user-slot {
  max-width: 4.8rem;
  margin-left: 0.05rem;
}

.search-panel {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 70;
  background: var(--bg);
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
}
.search-panel.is-open { display: flex !important; }
.search-panel[hidden] { display: none !important; }
.search-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  padding: 0.4rem 0.55rem 0.45rem;
  background: var(--bg);
}
.search-back {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: #f3f3f3;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: #222;
}
.search-back:active { background: #e8e8e8; }
.search-form { flex: 1 1 auto; min-width: 0; margin: 0; }
.search-form input {
  width: 100%;
  box-sizing: border-box;
  font-size: 16px;
  border: none;
  background: #ececec;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-family: inherit;
  font-weight: 600;
  color: #111;
  outline: none;
}
.search-form input::placeholder { color: #999; font-weight: 500; }
.search-hint {
  margin: 0 0.9rem 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.search-hint[hidden] { display: none !important; }
.search-results {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0.55rem calc(0.8rem + var(--safe-bottom));
  margin: 0;
  -webkit-overflow-scrolling: touch;
}
.search-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.2rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

/* Feed sequential grid — cols set by breakpoints below */
.feed-grid, .bento, .event-grid, .share-bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  align-items: start;
}
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; min-width: 0; border: none;
}
.card-media {
  position: relative; aspect-ratio: 3 / 4; background: #ebebeb; overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media video.card-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  background: #111;
}
.badge, .card-music-btn {
  position: absolute; top: 0.4rem; right: 0.4rem;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: grid; place-items: center; padding: 0;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 0.62rem; font-weight: 700;
  border: none;
  z-index: 3;
}
.card-music-btn { cursor: pointer; }
.card-body { padding: 0.45rem 0.5rem 0.55rem; display: flex; flex-direction: column; gap: 0.35rem; }
.card-title {
  margin: 0; font-size: 0.84rem; font-weight: 800; line-height: 1.35; color: #111;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.25rem; }
.card-author { display: inline-flex; align-items: center; gap: 0.28rem; min-width: 0; }
.mini-av-img {
  width: 1.05rem; height: 1.05rem; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
}
.mini-av {
  width: 1.05rem; height: 1.05rem; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, #ddd, #bbb); color: #fff;
  font-size: 0.55rem; font-weight: 800; display: grid; place-items: center;
}
.card-author-name {
  color: var(--muted); font-size: 0.66rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 5rem;
}
.feed-grid .body-text,
.feed-grid .meta,
.feed-grid .music-bar,
.feed-grid .comments { display: none; }
.card.is-wall-target { outline: 2px solid var(--red); }

.view { display: none; }
.view.is-on { display: block; }
html.boot-edit #home-chrome,
html.boot-edit #view-feed,
html.boot-edit #fab-upload { display: none !important; }
html.boot-edit #view-upload { display: block !important; }

/* Bottom tabbar — touch targets, safe-area, sticks to shell bottom */
.app-tabbar {
  position: relative;
  z-index: 50;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: calc(var(--tabbar-h) + var(--safe-bottom));
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding: 0.12rem 0.08rem var(--safe-bottom);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.04);
  overflow: visible;
}
.tabbar-item {
  position: relative; border: none; background: transparent; cursor: pointer;
  text-decoration: none; color: #9a9a9a; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.12rem; font-family: inherit;
  min-height: 48px; min-width: 0; padding: 0.16rem 0.04rem;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow: visible;
}
.tabbar-item.is-active { color: #111; }
.tabbar-ico {
  display: grid; place-items: center;
  width: 22px; height: 22px; line-height: 0;
  flex: 0 0 auto;
}
.tabbar-ico svg {
  width: 22px; height: 22px; display: block;
}
.tabbar-item.is-active .tabbar-ico svg { stroke-width: 2; }
.tabbar-txt { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.01em; }
.tabbar-publish { gap: 0; }
.tabbar-publish-ico {
  display: grid; place-items: center;
  width: 26px; height: 26px; line-height: 0;
  color: inherit; flex: 0 0 auto;
}
.tabbar-publish-ico svg {
  width: 26px; height: 26px; display: block;
}
.tabbar-publish .tabbar-txt { display: none !important; }
.tabbar-publish.is-active,
.tabbar-publish.is-active .tabbar-publish-ico { color: #111; }
.ico-publish {
  display: grid; place-items: center;
  width: 20px; height: 20px; color: inherit;
}
.ico-publish svg { width: 20px; height: 20px; display: block; }
.tabbar-badge {
  position: absolute;
  top: 0.06rem;
  left: 54%;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--red, #ff2442);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 0 0 1.5px #fff;
}

/* Guest gate */
.guest-gate {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: flex-end; justify-content: center;
}
.guest-gate[hidden] { display: none !important; }
.guest-gate.is-open { display: flex !important; }
.guest-gate-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.38); }
.guest-gate-sheet {
  position: relative; z-index: 1; width: min(560px, 100%);
  background: #fff; border-radius: 16px 16px 0 0;
  padding: 0.5rem 1.1rem calc(1.1rem + var(--safe-bottom));
  box-shadow: 0 -10px 30px rgba(0,0,0,0.12);
  animation: sheetUp 0.22s ease-out;
}
@keyframes sheetUp {
  from { transform: translateY(20px); opacity: 0.7; }
  to { transform: translateY(0); opacity: 1; }
}
.guest-gate-handle {
  width: 36px; height: 4px; border-radius: 99px; background: #e5e5e5; margin: 0.1rem auto 0.8rem;
}
.guest-gate-illu {
  width: 3rem; height: 3rem; border-radius: 50%; margin: 0 auto 0.65rem;
  display: grid; place-items: center; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, #f2c34d, #e07828);
  box-shadow: 0 8px 16px rgba(224,120,40,0.25);
}
.guest-gate-sheet h3 {
  margin: 0 0 0.35rem; text-align: center; font-size: 1.1rem; font-weight: 900;
}
.guest-gate-desc {
  margin: 0 0 0.95rem; text-align: center; color: var(--muted);
  font-size: 0.86rem; line-height: 1.55;
}
.guest-gate-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 0.45rem; }
.guest-gate-actions .primary, .guest-gate-actions .ghost {
  min-height: 2.55rem; width: 100%; font-size: 0.9rem;
}
.guest-gate-dismiss {
  display: block; width: 100%; border: none; background: transparent;
  color: var(--muted); font-weight: 700; font-size: 0.85rem; padding: 0.5rem;
  cursor: pointer; font-family: inherit;
}
body.guest-gate-open { overflow: hidden; }

/* Secondary panels */
.section-head { margin: 0.25rem 0 0.7rem; }
.section-head h3 { margin: 0; font-size: 1.02rem; font-weight: 900; }
.section-head p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.78rem; }
.panel, .tips-card, .register-form, .event-card, .share-card {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 0.95rem;
}
.page-hero {
  border: none; color: #fff; margin-bottom: 0.8rem; border-radius: var(--radius); padding: 1rem;
  background: linear-gradient(135deg, #f0c14b, #e07828);
}
.page-hero h2 { margin: 0 0 0.3rem; font-size: 1.35rem; font-weight: 900; color: #fff; }
.page-hero .lead, .page-hero .eyebrow { color: rgba(255,255,255,0.9); margin: 0 0 0.3rem; }
.page-hero-share { background: linear-gradient(135deg, #8d857c, #4e4a47); }
.page-hero-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.upload-layout {
  display: grid;
  gap: 0.7rem;
  width: 100%;
  max-width: 100%;
}
.form-panel { width: 100%; }
.cat-field { display: grid; gap: 0.4rem; }
/* Author display:grid beats the UA [hidden] rule, so the video cover
   (and 发帖加精) stayed visible after JS set the hidden attribute. */
.cat-field[hidden] { display: none !important; }
.audio-compose input[type="file"] { padding: 0.45rem 0.5rem; }
.cat-label { color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.cat-pills {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.cat-pill {
  flex: 0 0 auto;
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #666;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.cat-pill.is-on {
  color: #fff;
  background: #111;
  border-color: #111;
  font-weight: 900;
}
#view-upload.is-editing-post #post-share-type .cat-pill,
#post-share-type.is-locked .cat-pill {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.55;
}
#view-upload.is-editing-post #post-share-type .cat-pill.is-on,
#post-share-type.is-locked .cat-pill.is-on {
  opacity: 1;
}
.share-type-lock-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.stack { display: grid; gap: 0.7rem; }
label { display: grid; gap: 0.28rem; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
input, textarea, select {
  width: 100%; padding: 0.6rem 0.7rem; border-radius: 10px;
  border: 1px solid #e5e5e5; background: #fff; font-family: inherit; font-size: 16px; color: var(--text); outline: none;
  touch-action: manipulation;
}
input:focus, textarea:focus { border-color: #bbb; }
.preview-box {
  min-height: 130px; border-radius: 12px; border: 1px dashed #ccc;
  display: grid; place-items: center; color: var(--muted); overflow: hidden; background: #fafafa;
}
.preview-box img { width: 100%; max-height: 240px; object-fit: cover; }
.preview-box.is-album {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 8px;
  place-items: start; align-content: start; min-height: 0; overflow: visible;
}
.preview-box.is-album .album-thumb {
  position: relative; width: 86px; height: 86px; flex: 0 0 86px;
  border-radius: 8px; overflow: hidden; background: #eee;
}
.preview-box.is-album .album-thumb img {
  width: 100%; height: 100%; max-height: none; object-fit: cover; display: block;
}
.album-cover-tag {
  position: absolute; left: 4px; bottom: 4px;
  font-size: 10px; font-weight: 800; color: #fff;
  background: rgba(0,0,0,0.55); border-radius: 4px; padding: 1px 5px;
}
.album-del {
  position: absolute; top: 3px; right: 3px;
  width: 20px; height: 20px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff; font-size: 14px; line-height: 20px;
  cursor: pointer; padding: 0;
}
.album-add {
  width: 86px; height: 86px; flex: 0 0 86px;
  border: 1px dashed #ccc; border-radius: 8px; background: #fff;
  color: #888; font-weight: 800; font-size: 0.78rem; cursor: pointer;
}
.chip {
  padding: 0.35rem 0.7rem; border-radius: 999px; background: #f3f3f3; color: #444;
  font-weight: 700; font-size: 0.78rem; border: none; text-decoration: none; display: inline-flex;
}
.hint, .form-msg { margin: 0; font-size: 0.78rem; color: var(--muted); }
.form-msg.is-err { color: var(--danger); }
.form-msg.is-ok { color: var(--ok); }
.tips-card h4 { margin: 0 0 0.4rem; font-weight: 900; }
.tip-bubble {
  margin-top: 0.65rem; padding: 0.6rem; border-radius: 10px;
  background: #fff4f6; color: #a01f3a; font-weight: 700; font-size: 0.82rem;
}
.row-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.foot { text-align: center; color: var(--muted); font-size: 0.7rem; padding: 0.5rem 1rem 1rem; }
/* ICP filing number at the very bottom, centered, below the tabbar when one exists */
.site-beian {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0.2rem 0.75rem calc(0.22rem + var(--safe-bottom));
  text-align: center;
  font-size: 0.66rem;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: var(--bg, #f5f5f5);
}
.site-beian a {
  color: inherit;
  text-decoration: none;
}
.site-beian a:hover,
.site-beian a:focus-visible {
  text-decoration: underline;
}
body.kb-open .site-beian {
  display: none !important;
}
body.app-shell:not(.kb-open):has(.site-beian) .app-tabbar {
  height: var(--tabbar-h);
  min-height: var(--tabbar-h);
  padding-bottom: 0;
}
body:not(.app-shell):not(.admin-page) .site-beian {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  z-index: 51;
  width: 100%;
  max-width: var(--shell-max);
  padding: 0.2rem 0.75rem calc(0.22rem + var(--safe-bottom));
  background: var(--bg, #f5f5f5);
  text-align: center;
}
body:not(.app-shell):not(.admin-page):not(.kb-open) .app-tabbar {
  bottom: calc(var(--beian-h) + var(--safe-bottom));
  height: var(--tabbar-h);
  min-height: var(--tabbar-h);
  padding-bottom: 0;
}
body:not(.app-shell):not(.admin-page) .page-main,
body:not(.app-shell):not(.admin-page) .register-main {
  padding-bottom: calc(var(--tabbar-h) + var(--beian-h) + var(--safe-bottom) + 2rem);
}
body.admin-page .site-beian {
  padding: 0.7rem 1rem calc(0.8rem + var(--safe-bottom));
  text-align: center;
}
.fab { display: none !important; }

.auth-dialog {
  border: none;
  padding: 0;
  background: transparent;
  box-sizing: border-box;
  position: fixed;
  top: calc(var(--vv-offset, 0px) + 0.75rem);
  left: calc(var(--vv-left, 0px) + (var(--vv-width, 100vw) - min(400px, calc(var(--vv-width, 100vw) - 2rem))) / 2);
  right: auto;
  margin: 0;
  width: min(400px, calc(var(--vv-width, 100vw) - 2rem));
  max-width: 400px;
  max-height: calc(var(--vv-height, 100dvh) - 1.5rem);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.auth-dialog::backdrop { background: rgba(0,0,0,0.35); }
.auth-dialog .panel { width: 100%; max-width: 100%; box-sizing: border-box; margin: 0; }
.auth-dialog .tab[href] { text-decoration: none; display: flex; align-items: center; justify-content: center; }
.tabs { display: flex; gap: 0.35rem; }
.tab {
  flex: 1; padding: 0.5rem; border-radius: 10px; color: #666; background: #fff;
  border: 1px solid #e5e5e5; font-weight: 700; cursor: pointer; font-family: inherit;
}
.tab.is-on { color: #fff; background: #111; border-color: #111; }

.bento .body-text, .bento .meta, .bento .comments { display: block; }
.bento .music-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.5rem; border-radius: 999px; border: 1px solid var(--line); background: #fafafa; }
.bento .card-media { aspect-ratio: 4 / 3; }
.bento .card-body { padding: 0.55rem 0.6rem 0.7rem; }
.comment { margin: 0 0 0.25rem; font-size: 0.78rem; color: #555; }
.comment b { color: #111; }
.comment-form { display: flex; gap: 0.4rem; margin-top: 0.4rem; }
.comment-form input { flex: 1; min-height: 2.3rem; }
.music-bar button {
  width: 1.6rem; height: 1.6rem; border-radius: 50%; border: none; background: #111; color: #fff; cursor: pointer;
}
.music-bar span { font-size: 0.72rem; color: var(--muted); font-weight: 700; }
.comments { border-top: 1px solid var(--line); padding-top: 0.45rem; margin-top: 0.25rem; }
.comments h4 { margin: 0 0 0.3rem; font-size: 0.8rem; font-weight: 800; }

.event-grid, .share-bento { margin-top: 0.3rem; }
.event-card h3, .share-card h3 { margin: 0 0 0.3rem; font-size: 1rem; font-weight: 900; }
.event-meta, .share-tags { color: var(--muted); font-size: 0.74rem; display: flex; flex-wrap: wrap; gap: 0.35rem; font-weight: 700; }
.event-desc, .share-card p { color: #555; line-height: 1.55; font-size: 0.86rem; margin: 0.3rem 0 0.65rem; }
.event-badge, .share-ribbon {
  display: inline-block; padding: 0.12rem 0.45rem; border-radius: 6px;
  background: linear-gradient(135deg, #ff9a4a, #e07828); color: #fff; font-size: 0.66rem; font-weight: 800;
}
.event-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.event-count { color: #e07828; font-weight: 800; font-size: 0.76rem; }
.event-join.is-joined { background: #fff; color: #111; border: 1px solid #e5e5e5; }
.share-card { display: flex; flex-direction: column; gap: 0.4rem; }
.share-card .chip, .share-card .primary { align-self: flex-start; }

.page-main, .register-main {
  width: min(var(--shell-max), 100%); margin: 0 auto; padding: 0.65rem clamp(0.45rem, 1.6vw, 1rem) 5rem;
  background: var(--bg); min-height: 100vh;
}
.register-grid { display: grid; gap: 0.9rem; }
.avatar-preview-wrap {
  width: 108px; height: 108px; border-radius: 50%; border: 1px dashed #ccc; background: #f5f5f5;
  display: grid; place-items: center; overflow: hidden; margin: 0.45rem 0;
}
.avatar-preview { width: 100%; height: 100%; object-fit: cover; display: none; border-radius: 50%; }
.avatar-preview.is-on { display: block; }
.avatar-placeholder { color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.file-pill {
  display: inline-flex; padding: 0.4rem 0.85rem; border-radius: 999px; border: 1px solid #e5e5e5;
  background: #fff; font-weight: 800; cursor: pointer;
}
.file-pill input { display: none; }
.crop-box { margin-top: 0.65rem; padding: 0.65rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.crop-stage { position: relative; width: min(280px,100%); margin: 0 auto 0.5rem; overflow: hidden; border-radius: 10px; background: #f0f0f0; }
#crop-canvas { width: 100%; height: auto; display: block; touch-action: none; cursor: grab; }
.crop-frame {
  pointer-events: none; position: absolute; inset: 8%;
  border: 1px dashed rgba(0,0,0,0.35); border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(255,255,255,0.35);
}
.crop-zoom { display: grid; gap: 0.28rem; margin-bottom: 0.35rem; }
.crop-zoom input[type=range] { width: 100%; accent-color: var(--red); }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pill {
  display: inline-flex; gap: 0.28rem; align-items: center; justify-content: center;
  padding: 0.35rem 0.7rem; border-radius: 999px; border: 1px solid #e5e5e5;
  background: #fff; cursor: pointer; font-weight: 700; white-space: nowrap; box-sizing: border-box;
}
.pill input[type="radio"] {
  margin: 0; flex: 0 0 auto; width: 0.95rem; height: 0.95rem; align-self: center;
}
.pill:has(input:checked) { background: #111; color: #fff; border-color: #111; }
.gender-field { border: 1px dashed #ddd; border-radius: 12px; padding: 0.65rem 0.7rem; margin: 0; }
.gender-field legend { padding: 0 0.15rem; font-weight: 800; }
.gender-field .pill-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(4.6rem, 1fr));
  gap: 0.45rem;
  width: 100%;
  align-items: stretch;
}
.gender-field .pill {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.42rem 0.55rem;
  gap: 0.4rem;
  border-radius: 999px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: visible;
}
.tag-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
/* 个人标签胶囊：只压高度，字号/颜色/圆角不变（原 .chip padding 0.35rem 0.7rem，无 line-height） */
.tag-chip {
  padding-top: 0.14rem;
  padding-bottom: 0.14rem;
  line-height: 1.2;
  min-height: 0;
  align-items: center;
}
.topbar { display: none !important; }

/* Persistent top header on secondary pages (activities / share / register) */
body:not(.app-shell) > .app-top {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  box-sizing: border-box;
}
body:not(.app-shell) > .app-top + .page-main,
body:not(.app-shell) > .app-top + .register-main,
body:not(.app-shell) .page-main,
body:not(.app-shell) .register-main {
  /* keep existing bottom pad; ensure room under sticky top is natural */
}
.nav-btn { color: inherit; text-decoration: none; }
.meta { color: var(--muted); font-size: 0.7rem; }
.body-text { margin: 0; color: #555; font-size: 0.8rem; line-height: 1.5; }
.slot-login,.slot-logout{font-size:0.68rem;padding:0.15rem 0.35rem;border-radius:999px;}


/* Secondary pages (activities / share / register) without .phone-frame */
body:not(.app-shell) {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body:not(.app-shell) .app-tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: var(--shell-max);
}
body:not(.app-shell) .page-main,
body:not(.app-shell) .register-main {
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 1rem);
}
/* === RESPONSIVE BREAKPOINTS === */
/* Very narrow phones: compact chrome, keep at least 2 feed columns */
@media (max-width: 379px) {
  .promo-strip { gap: 0.35rem; }
  .promo-card { min-height: 70px; padding: 0.5rem 0.45rem; }
  .promo-kicker { font-size: 0.58rem; }
  .promo-card strong { font-size: 0.82rem; }
  .promo-go { font-size: 0.58rem; padding: 0.14rem 0.42rem; }
  .feed-grid, .bento, .event-grid, .share-bento, .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
  }
  .top-brand { display: none; }
  .top-tab { font-size: 0.88rem; }
  .app-top { gap: 0.15rem; padding-left: 0.25rem; padding-right: 0.3rem; }
  .tabbar-ico, .tabbar-ico svg { width: 20px; height: 20px; }
  .tabbar-publish-ico, .tabbar-publish-ico svg { width: 24px; height: 24px; }
  .tabbar-txt { font-size: 0.55rem; }
  .user-slot { max-width: 4.2rem; }
  .card-title { font-size: 0.8rem; }
  .card-body { padding: 0.4rem 0.4rem 0.45rem; }
}

/* Phone default already 2-col via base rule */

/* Pad / large phone landscape */
@media (min-width: 600px) {
  .promo-card { min-height: 88px; }
  .promo-card strong { font-size: 1.05rem; }
  .sub-tab { font-size: 0.98rem; padding: 0.35rem 0.8rem; }
  .feed-grid, .bento, .event-grid, .share-bento { gap: 0.65rem; }
  .card-title { font-size: 0.9rem; }
  /* upload stays single-column */
}

/* Desktop / large pad: optional 3-col feed */
@media (min-width: 900px) {
  .feed-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }
  .bento, .event-grid, .share-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .app-main { padding-left: 1rem; padding-right: 1rem; }
  .promo-strip { gap: 0.65rem; }
  .promo-card { min-height: 92px; }
  .top-tab { font-size: 1rem; gap: 1rem; }
  .top-tabs { gap: 1.1rem; }
  .tabbar-txt { font-size: 0.68rem; }
}

/* Extra-wide desktop still capped by --shell-max */
@media (min-width: 1200px) {
  :root { --shell-max: 960px; }
  .card-media { aspect-ratio: 3 / 4; }
}

/* Community feed masonry: independent columns, cover-driven heights */
.feed-grid.is-masonry {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
}
.feed-grid.is-masonry > .feed-masonry-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: inherit;
}
.feed-grid.is-masonry > .feed-loading,
.feed-grid.is-masonry > .form-msg,
.feed-grid.is-masonry > .search-empty,
.feed-grid.is-masonry > .panel {
  flex: 1 0 100%;
  width: 100%;
  grid-column: auto;
}
.feed-grid .card-media {
  aspect-ratio: var(--cover-ratio, 3 / 4);
}
.feed-grid .card-media img,
.feed-grid .card-media video.card-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Prefer reduced overflow on any short landscape phone */
@media (max-height: 500px) and (orientation: landscape) {
  .promo-strip { padding-bottom: 0.35rem; }
  .promo-card { min-height: 64px; }
  .app-main { padding-top: 0.35rem; }
}

/* Prevent stubborn horizontal scroll from long words / grids */
.app-main,
.feed-grid,
.card,
.promo-strip,
.sub-tabs {
  max-width: 100%;
}
.phone-frame {
  /* keep shell max-width from earlier rules; only clamp to viewport */
  width: min(100%, var(--shell-max));
}
.card-title, .promo-card strong {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ===== Post detail (fullscreen image + right rail + comment sheet) ===== */
body.post-page {
  margin: 0;
  min-height: 100%;
  background: #0a0a0a;
  color: #fff;
  font-family: var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.post-page.cmt-open {
  overflow: hidden;
  height: 100%;
}
.post-stage {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
}
body.post-page { max-width: 100vw; overflow-x: hidden; }
.post-chrome {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: calc(0.55rem + var(--safe-top)) 0.7rem 0.55rem;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%);
}
.post-chrome > * { pointer-events: auto; }
.post-back {
  width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  border: none; border-radius: 50%;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  cursor: pointer;
  display: grid; place-items: center;
  padding: 0;
}
.post-back-ico {
  display: block; width: 12px; height: 12px;
  border-left: 2.2px solid #fff; border-bottom: 2.2px solid #fff;
  transform: rotate(45deg); margin-left: 3px;
}
.post-author-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(0,0,0,0.35); backdrop-filter: blur(6px);
  border-radius: 999px; padding: 0.25rem 0.65rem 0.25rem 0.25rem;
  max-width: min(60vw, 220px);
}
.post-author-av {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  max-width: none;
}
.post-author-name {
  font-size: 0.82rem; font-weight: 700; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.post-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  min-height: 100%;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  background: #0a0a0a;
}
.post-media img#post-image,
.post-album-slide img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
}
.post-album {
  position: absolute;
  inset: 0;
}
.post-album-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.post-album-track::-webkit-scrollbar { display: none; }
.post-album-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
}
.post-album-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(5.6rem + var(--safe-bottom));
  z-index: 18;
  display: flex;
  gap: 6px;
  pointer-events: auto;
}
.post-album-dot {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255,255,255,0.42); cursor: pointer;
}
.post-album-dot.is-on { background: #fff; }
.post-missing {
  color: rgba(255,255,255,0.7); font-size: 0.95rem; text-align: center;
}

.post-rail {
  position: absolute;
  right: calc(0.55rem + var(--safe-right));
  bottom: calc(7.5rem + var(--safe-bottom));
  top: auto;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  pointer-events: none;
}
.post-rail > * { pointer-events: auto; }
.rail-av {
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid #fff; padding: 0; overflow: hidden;
  background: #333; cursor: pointer;
  position: relative;
}
.rail-av-clip {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #333;
}
.rail-av img {
  width: 100%; height: 100%; object-fit: cover; display: block; max-width: none;
}
.rail-av-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: #f0e6da;
  color: #8a5a2b;
  font-weight: 800;
  font-size: 0.95rem;
}
.rail-av-fallback[hidden] { display: none !important; }
.rail-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.18rem;
  background: transparent; border: none; color: #fff; cursor: pointer;
  min-width: 44px; min-height: 44px; padding: 0.15rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.45);
}
.rail-ico {
  width: 28px; height: 28px; display: block; position: relative;
}
/* 点赞心形使用 post.html 内的 inline SVG，旧的伪元素心已移除 */
/* 留言气泡使用 post.html 内的 inline SVG（rail-cmt-svg），旧的伪元素气泡已移除 */
.rail-count {
  font-size: 0.82rem; font-weight: 800; line-height: 1; color: #fff;
}
/* 侧栏只保留图标和数量：四个标签文字已从 post.html 删除，这里兜底隐藏且不占位 */
.rail-label { display: none !important; }

.post-music {
  position: absolute;
  left: 0.85rem;
  right: 4.5rem;
  bottom: calc(4.35rem + var(--safe-bottom));
  z-index: 18;
  display: inline-flex;
  align-items: center;
  max-width: min(78vw, 320px);
  width: max-content;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  color: #fff;
  pointer-events: auto;
}
.post-music[hidden] { display: none !important; }
.post-music-chip {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.48rem;
  min-width: 0;
  max-width: 100%;
}
.post-music-name {
  font-size: 0.78rem; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.post-music-wave {
  display: inline-flex;
  align-items: flex-end;
  justify-content: space-between;
  flex: 0 0 auto;
  width: 11px;
  height: 12px;
}
.post-music-wave i {
  display: block;
  width: 2px;
  height: 12px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.9;
  transform: scaleY(0.28);
  transform-origin: center bottom;
}
.post-music.is-playing .post-music-wave i:nth-child(1) { animation: post-music-wave 0.72s ease-in-out infinite; }
.post-music.is-playing .post-music-wave i:nth-child(2) { animation: post-music-wave 0.72s ease-in-out 0.12s infinite; }
.post-music.is-playing .post-music-wave i:nth-child(3) { animation: post-music-wave 0.72s ease-in-out 0.24s infinite; }
.post-music.is-playing .post-music-wave i:nth-child(4) { animation: post-music-wave 0.72s ease-in-out 0.18s infinite; }
@keyframes post-music-wave {
  0%, 100% { transform: scaleY(0.28); }
  40% { transform: scaleY(1); }
  70% { transform: scaleY(0.45); }
}

.post-caption {
  position: absolute;
  left: 0.85rem; right: 4.5rem;
  bottom: calc(1.1rem + var(--safe-bottom));
  z-index: 16;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.55);
}
.post-title {
  margin: 0 0 0.25rem; font-size: 0.98rem; font-weight: 800; line-height: 1.35;
}
.post-body {
  margin: 0; font-size: 0.82rem; font-weight: 500; opacity: 0.92; line-height: 1.45;
}

/* Comment bottom sheet */
.cmt-scrim {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,0.45);
}
.cmt-sheet {
  position: fixed; left: 0; right: 0; z-index: 90;
  width: 100%;
  max-width: none;
  margin: 0;
  /* --cmt-kb: keyboard overlap from visualViewport, or a lift when
     position:fixed is layout-relative and would otherwise sit in the
     leftover band below the visual viewport (0 when closed / VV-fixed).
     --cmt-extend: height of that leftover band, painted by ::after BELOW
     the sheet — never added to the flex box or to --cmt-accessory
     (that created a tall white gap above the iOS ↑↓✓ bar).
     --cmt-accessory: measured overlay clearance only (often 0 on
     WeChat/iOS, cap 150) so the composer sits flush on the ↑↓✓ bar. */
  bottom: var(--cmt-kb, 0px);
  height: min(72dvh, 680px);
  max-height: calc(100dvh - 6vh - var(--cmt-kb, 0px));
  background: #fff;
  color: #111;
  border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.22);
  padding-bottom: calc(var(--safe-bottom, 0px) + var(--cmt-accessory, 0px));
  box-sizing: border-box;
  animation: cmt-up 0.28s ease-out;
}
@keyframes cmt-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.cmt-head {
  position: relative;
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 0.55rem 3rem 0.35rem;
  border-bottom: 1px solid #f0f0f0;
}
.cmt-title {
  margin: 0; font-size: 0.92rem; font-weight: 800; color: #222;
}
.cmt-close {
  position: absolute; right: 0.55rem; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: #f0f0f0; color: #222; font-size: 1.35rem; line-height: 1;
  cursor: pointer; display: grid; place-items: center; padding: 0;
  font-weight: 500; z-index: 2;
}
.cmt-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.45rem 0.85rem 0.55rem;
}
.cmt-empty {
  text-align: center; color: #999; font-size: 0.85rem; padding: 2rem 0;
}
.cmt-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  gap: 0.55rem;
  padding: 0.55rem 0;
  align-items: start;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.06);
}
.cmt-item.is-reply {
  padding-left: 2.4rem;
  grid-template-columns: 28px minmax(0, 1fr) 32px;
}
.cmt-av {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  max-width: none; display: block;
}
.cmt-item.is-reply .cmt-av { width: 28px; height: 28px; }
.cmt-av-fallback {
  display: grid; place-items: center;
  background: #f0e6da; color: #8a5a2b; font-weight: 800; font-size: 0.75rem;
}
.cmt-main { min-width: 0; }
.cmt-user-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.28rem;
  margin-bottom: 0.15rem;
}
.cmt-user {
  font-size: 0.78rem; font-weight: 700; color: #666;
}
.cmt-badge {
  display: inline-flex; align-items: center;
  font-size: 0.58rem; font-weight: 800; color: #fff;
  background: linear-gradient(90deg, #4f8cff, #6aa8ff);
  border-radius: 4px; padding: 0.08rem 0.28rem; line-height: 1.2;
}
.cmt-text {
  margin: 0 0 0.28rem; font-size: 0.9rem; color: #222; line-height: 1.45;
  word-break: break-word;
}
.cmt-thumb-wrap {
  margin: 0.2rem 0 0.35rem;
}
.cmt-thumb {
  width: 96px; height: 96px; object-fit: cover; border-radius: 8px;
  max-width: none; display: block; background: #f3f3f3;
}
.cmt-meta {
  display: flex; align-items: center; gap: 0.65rem;
  font-size: 0.7rem; color: #999;
}
.cmt-reply-btn {
  border: none; background: transparent; color: #999;
  font-size: 0.7rem; font-weight: 700; cursor: pointer;
  padding: 0.15rem 0.25rem; min-height: 28px;
  font-family: inherit;
}
.cmt-heart {
  border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  gap: 0.05rem; padding: 0.15rem; color: #bbb; min-width: 32px;
}
.cmt-heart-ico::before {
  content: "♡"; font-size: 0.95rem; line-height: 1; color: #c8c8c8;
}
.cmt-heart-n { font-size: 0.62rem; color: #aaa; font-weight: 600; }

.cmt-foot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #f0f0f0;
  background: #fff;
  position: relative;
  z-index: 2;
  /* focus ring on pill must not clip */
  overflow: visible;
}
/* Keyboard up: drop home-indicator and residual footer padding so the
   send row sits flush on the iOS form accessory bar (Douyin-style).
   --cmt-accessory is only the measured overlay clearance (no 52px
   cushion); leftover below the visual viewport is painted by ::after,
   not by extra flex/padding height (which showed up as a white band
   between the send row and the accessory). */
html.cmt-kb-open .cmt-sheet,
body.cmt-kb-open .cmt-sheet,
.cmt-sheet.cmt-kb-open {
  padding-bottom: var(--cmt-accessory, 0px);
  height: auto;
  overflow: visible;
}
html.cmt-kb-open .cmt-sheet::after,
body.cmt-kb-open .cmt-sheet::after,
.cmt-sheet.cmt-kb-open::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: var(--cmt-extend, 0px);
  background: #fff;
  pointer-events: none;
}
html.cmt-kb-open .cmt-foot,
body.cmt-kb-open .cmt-foot,
.cmt-sheet.cmt-kb-open .cmt-foot {
  padding-bottom: 0;
}
html.cmt-kb-open .cmt-head,
body.cmt-kb-open .cmt-head,
.cmt-sheet.cmt-kb-open .cmt-head {
  min-height: 40px;
  padding: 0.32rem 3rem 0.2rem;
}
html.cmt-kb-open .cmt-list,
body.cmt-kb-open .cmt-list,
.cmt-sheet.cmt-kb-open .cmt-list {
  flex: 0 0 auto;
  flex-grow: 0;
  flex-shrink: 0;
  height: var(--cmt-list-max, 7.5rem);
  max-height: var(--cmt-list-max, 7.5rem);
  padding: 0.2rem 0.85rem 0.2rem;
}
/* Keyboard open while replying: keep every comment in the list in its
   original order. The list is exactly one row tall; JS scrolls the
   target comment to the top of .cmt-list (do not extract, clone, or hide). */
.cmt-reply-hint {
  flex: 1 0 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.75rem; font-weight: 700; color: #888;
}
.cmt-reply-hint[hidden] { display: none !important; }
.cmt-reply-cancel {
  border: none; background: transparent; color: #999;
  font-size: 0.72rem; font-weight: 700; cursor: pointer;
  padding: 0.1rem 0.25rem; font-family: inherit;
}
.cmt-input-pill {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  display: flex; align-items: center; gap: 0.25rem;
  background: #f2f2f2;
  border-radius: 22px;
  padding: 0.32rem 0.9rem;
  min-height: 42px;
  border: 1.5px solid transparent;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.cmt-input-pill:focus-within {
  background: #fff;
  border-color: #c8c8c8;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}
.cmt-input-pill input,
.cmt-input-pill input:focus,
.cmt-input-pill input:focus-visible {
  /* override global input { width:100%; padding; border } that blows the pill layout */
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  border: none !important;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  /* >=16px prevents iOS Safari auto-zoom on focus */
  font-size: 16px;
  line-height: 1.35;
  font-family: inherit;
  color: #222;
  padding: 0.35rem 0;
  outline: none !important;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  caret-color: #111;
}
.cmt-input-pill input::placeholder {
  color: #999;
  opacity: 1;
}
.cmt-composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: 40px;
  flex: 0 0 auto;
}
.cmt-tools { display: flex; align-items: center; gap: 0.15rem; flex: 1 1 auto; min-width: 0; }
.cmt-tool {
  width: 36px; height: 36px; border: none; background: transparent;
  cursor: pointer; font-size: 1.05rem; border-radius: 50%;
  display: grid; place-items: center; color: #555; padding: 0;
  flex: 0 0 auto;
  -webkit-tap-highlight-color: transparent;
}
.cmt-send {
  flex: 0 0 auto;
  margin-left: auto;
  border: 1px solid #e2e2e2;
  background: #f5f5f5;
  color: #333;
  border-radius: 999px;
  padding: 0.28rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  min-height: 32px;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cmt-send.is-active {
  background: #111;
  border-color: #111;
  color: #fff;
}

/* 详情页留言：复用聊天页的表情 / 图片 / 语音输入 */
.cmt-media-hint {
  flex: 1 0 100%;
  margin: 0;
  padding: 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #888;
  line-height: 1.35;
}
.cmt-media-hint[hidden] { display: none !important; }
.cmt-media-hint.is-err { color: #c0392b; }
.cmt-foot .chat-composer.cmt-composer {
  border-top: 1px solid #ececec;
  padding: 0.4rem 0.55rem 0.5rem;
  position: static;
  z-index: 2;
  background: #fff;
}
.cmt-foot .cmt-composer #cmt-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  background: #f3f3f3;
  border: none;
  border-radius: 20px;
  padding: 0.55rem 0.95rem;
  min-height: 2.25rem;
  font-family: inherit;
  font-size: 16px;
}
.cmt-sheet .chat-emoji-panel {
  border-top: 1px solid #ececec;
}
.cmt-text.is-emoji {
  font-size: 1.85rem;
  line-height: 1.2;
}
.cmt-media {
  margin: 0.28rem 0 0;
  max-width: 100%;
}
.cmt-media .chat-bubble.is-image {
  max-width: min(14.5rem, 72%);
}
.cmt-media .chat-voice-wrap {
  margin-top: 0.05rem;
}
.cmt-media .chat-bubble.is-voice {
  /* 留言列表不区分左右气泡，统一用浅底语音条 */
}

@media (min-width: 640px) {
  .cmt-sheet {
    height: min(68dvh, 720px);
    border-radius: 18px 18px 0 0;
  }
}
@media (min-width: 900px) {
  .post-stage { max-width: 960px; margin: 0 auto; }
  /* Align sheet with centered post shell — full shell width, no floating card gutters */
  .cmt-sheet {
    left: max(0px, calc(50vw - 480px));
    right: max(0px, calc(50vw - 480px));
    width: auto;
    max-width: none;
    margin: 0;
  }
  .cmt-scrim {
    left: max(0px, calc(50vw - 480px));
    right: max(0px, calc(50vw - 480px));
    width: auto;
  }
}

.cmt-sheet[hidden],
.cmt-scrim[hidden] {
  display: none !important;
}
.rail-ico.rail-heart,
.rail-ico.rail-cmt,
.rail-ico.rail-star,
.rail-ico.rail-share {
  font-size: 1.55rem;
  line-height: 1;
  text-align: center;
  width: auto; height: auto;
}
.rail-ico.rail-share {
  font-size: 0;
  font-weight: 400;
  width: 28px;
  height: 28px;
  color: #fff;
}
.rail-ico.rail-share .rail-share-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  color: #fff;
  fill: #fff;
  stroke: #fff;
}
.rail-ico.rail-heart {
  width: 28px;
  height: 28px;
  color: #fff;
}
.rail-ico.rail-heart .rail-heart-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: currentColor;
  stroke: currentColor;
}
.rail-ico.rail-cmt {
  width: 28px;
  height: 28px;
  color: #fff;
}
.rail-ico.rail-cmt .rail-cmt-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.rail-ico.rail-star {
  width: 28px;
  height: 28px;
  color: #fff;
}
.rail-ico.rail-star .rail-star-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: currentColor;
  stroke: currentColor;
}
.rail-ico.rail-heart::before,
.rail-ico.rail-cmt::before,
.rail-ico.rail-star::before,
.rail-ico.rail-share::before { content: none !important; display: none !important; }
.rail-btn.is-liked .rail-heart { color: #ff2442; }
.rail-btn.is-favorited .rail-star { color: #ffbf3a; }
.rail-btn.is-favorited .rail-star .rail-star-svg {
  fill: #ffbf3a;
  stroke: #ffbf3a;
}

/* 帖子详情 · 分享给互关好友 */
.share-scrim {
  position: fixed;
  inset: 0;
  z-index: 94;
  background: rgba(0, 0, 0, 0.45);
}
.share-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  width: 100%;
  max-width: 960px;
  max-height: min(78dvh, 700px);
  margin: 0 auto;
  background: #fff;
  color: #111;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding-bottom: var(--safe-bottom, 0px);
  animation: share-sheet-up 0.26s ease-out;
}
@keyframes share-sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.share-head {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.55rem 3rem 0.35rem;
  border-bottom: 1px solid #f0f0f0;
}
.share-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #111;
}
.share-close {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f0f0f0;
  color: #222;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  font-weight: 500;
  z-index: 2;
}
.share-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.7rem 0 0.8rem;
}
.share-status {
  margin: 0.85rem 1rem 1.15rem;
  text-align: center;
  color: #999;
  font-size: 0.85rem;
  line-height: 1.5;
}
.share-status.is-err { color: #a05a4a; }
.share-mutual-wrap {
  padding: 0.15rem 0 0.55rem;
  border-bottom: 1px solid #f2f2f2;
}
.share-mutual-scroller {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.3rem 1rem 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.share-mutual-scroller::-webkit-scrollbar { display: none; width: 0; height: 0; }
.share-mutual-cell {
  flex: 0 0 auto;
  width: 4rem;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.share-mutual-cell:active { opacity: 0.72; }
.share-mutual-av-wrap {
  position: relative;
  width: 3.35rem;
  height: 3.35rem;
  display: block;
}
.share-mutual-av {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #eee;
  box-sizing: border-box;
}
.share-mutual-av-fallback {
  display: grid;
  place-items: center;
  background: #f0e6da;
  color: #8a5a2b;
  font-weight: 800;
  font-size: 1rem;
}
.share-mutual-cell.is-selected .share-mutual-av {
  box-shadow: 0 0 0 2px #111;
}
.share-mutual-check {
  position: absolute;
  right: -0.15rem;
  bottom: -0.1rem;
  width: 1.25rem;
  height: 1.25rem;
  box-sizing: border-box;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.65);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}
.share-mutual-cell.is-selected .share-mutual-check {
  opacity: 1;
  transform: scale(1);
}
.share-mutual-name {
  width: 100%;
  color: #333;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-compose {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.85rem 1rem 0.1rem;
  animation: share-compose-in 0.18s ease-out;
}
@keyframes share-compose-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.share-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fafafa;
  min-width: 0;
}
.share-preview-media {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9px;
  overflow: hidden;
  flex: 0 0 auto;
  background: #f1f1f1;
  display: grid;
  place-items: center;
}
.share-preview-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.share-preview-ph {
  color: #b9a99a;
  font-size: 1.1rem;
  font-weight: 800;
}
.share-preview-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}
.share-preview-kicker {
  color: #999;
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1.2;
}
.share-preview-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #111;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
}
.share-caption-wrap {
  display: block;
  margin: 0;
}
#share-caption {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  margin: 0;
  padding: 0.72rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f3f3f3;
  color: #111;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.35;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
#share-caption:focus {
  background: #fff;
  border-color: #cfcfcf;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}
#share-caption::placeholder { color: #999; opacity: 1; }
.share-error {
  margin: 0;
  color: #b23a2f;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
}
.share-send {
  width: 100%;
  min-height: 44px;
  border: none;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.share-send:active { opacity: 0.82; }
.share-send:disabled { opacity: 0.5; cursor: default; }
.share-toast {
  position: fixed;
  left: 50%;
  bottom: calc(2rem + var(--safe-bottom, 0px));
  z-index: 120;
  max-width: 80vw;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.88);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.share-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.share-scrim[hidden],
.share-sheet[hidden],
.share-status[hidden],
.share-mutual-wrap[hidden],
.share-compose[hidden],
.share-preview-cover[hidden],
.share-preview-ph[hidden],
.share-error[hidden],
.share-toast[hidden] {
  display: none !important;
}
body.share-open { overflow: hidden; }
@media (min-width: 900px) {
  .share-sheet {
    left: max(0px, calc(50vw - 480px));
    right: max(0px, calc(50vw - 480px));
    width: auto;
    max-width: none;
    margin: 0;
  }
  .share-scrim {
    left: max(0px, calc(50vw - 480px));
    right: max(0px, calc(50vw - 480px));
    width: auto;
  }
}
/* —— 我的：资料卡 + 编辑 + 作品瀑布流 —— */
.mine-layout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.15rem 0 1.2rem;
}
.mine-profile-card { position: relative; padding: 0.9rem 0.95rem 1rem; }
.mine-hero {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.mine-avatar-wrap {
  position: relative;
  width: 4.6rem;
  height: 4.6rem;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, #f7ebe0, #efe0d2);
  border: 2px solid #fff;
  box-shadow: 0 6px 18px rgba(80, 48, 20, 0.12);
}
.mine-avatar {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mine-avatar-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.35rem;
  color: #7a5a3a;
}
.mine-avatar-fallback[hidden] { display: none !important; }
.mine-avatar[hidden] { display: none !important; }
.mine-avatar-wrap.is-loading .mine-avatar-fallback { display: none !important; }
.mine-avatar-wrap.is-loading {
  background: linear-gradient(110deg, #f3e6d8 0%, #faf4ee 42%, #f3e6d8 84%);
  background-size: 200% 100%;
  animation: mine-avatar-shimmer 1.5s ease-in-out infinite;
}
.mine-avatar-wrap.is-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.7rem;
  height: 0.7rem;
  margin: -0.35rem 0 0 -0.35rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6d6, var(--gold, #e8b03a) 58%, #c99220);
  box-shadow: 0 0 0 3px rgba(232, 176, 58, 0.16);
  opacity: 0.7;
  animation: mine-avatar-glow 1.5s ease-in-out infinite;
}
@keyframes mine-avatar-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@keyframes mine-avatar-glow {
  0%, 100% { transform: scale(0.86); opacity: 0.45; }
  50% { transform: scale(1); opacity: 0.85; }
}
@media (prefers-reduced-motion: reduce) {
  .mine-avatar-wrap.is-loading,
  .mine-avatar-wrap.is-loading::after {
    animation: none;
  }
}
.mine-hero-meta { min-width: 0; flex: 1; }
.mine-nick-row {
  --mine-name-size: 1.12rem;
  --mine-name-lh: 1.2;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  width: 100%;
}
.mine-nick-row .mine-nick {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--mine-name-size);
  line-height: var(--mine-name-lh);
}
.mine-nick {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}
.mine-line {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.mine-bio {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #4a3a2c;
}
.mine-activity {
  margin: 0.32rem 0 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: #8a6a4a;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.mine-activity[hidden] { display: none !important; }
.mine-activity-label { font-weight: 700; }
.mine-activity-num {
  font-size: 1.02rem;
  font-weight: 900;
  color: #c45c26;
  letter-spacing: 0.01em;
  line-height: 1;
}
.mine-activity-rank-btn {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.08rem 0.48rem;
  border-radius: 999px;
  border: 1px solid #e8d5c4;
  background: #fffaf5;
  color: #8a5a32;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.mine-activity-rank-btn:active { background: #f3ebe3; }
.mine-tags { margin-top: 0.45rem; }

/* 活跃度排行榜 */
.activity-rank-hint {
  margin: 0.15rem 0.2rem 0.7rem;
  color: #8a6a4a;
  font-size: 0.78rem;
  line-height: 1.5;
}
.activity-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.activity-rank-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #eadfd3;
  box-shadow: 0 1px 3px rgba(80, 48, 20, 0.04);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
a.activity-rank-row { color: inherit; }
.activity-rank-row:active { background: #fffaf5; }
.activity-rank-row.is-me {
  border-color: #e2c4a8;
  background: linear-gradient(180deg, #fff8f1, #fff);
  box-shadow: 0 1px 4px rgba(196, 92, 38, 0.08);
}
.activity-rank-pos {
  flex: 0 0 1.6rem;
  text-align: center;
  font-weight: 900;
  font-size: 0.95rem;
  color: #8a6a4a;
}
.activity-rank-row.is-top1 .activity-rank-pos { color: #c45c26; }
.activity-rank-row.is-top2 .activity-rank-pos { color: #b8860b; }
.activity-rank-row.is-top3 .activity-rank-pos { color: #9a7048; }
.activity-rank-avatar {
  position: relative;
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, #f7ebe0, #efe0d2);
  border: 2px solid #fff;
}
.activity-rank-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.activity-rank-avatar-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.95rem;
  color: #7a5a3a;
}
.activity-rank-avatar-fallback[hidden],
.activity-rank-avatar img[hidden] { display: none !important; }
.activity-rank-meta { min-width: 0; flex: 1; }
.activity-rank-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #4a3a2c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-rank-you {
  margin-left: 0.3rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: #c45c26;
}
.activity-rank-score {
  flex: 0 0 auto;
  font-size: 1.05rem;
  font-weight: 900;
  color: #c45c26;
  letter-spacing: 0.01em;
}
.activity-rank-score-unit {
  margin-left: 0.12rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #8a6a4a;
}
.activity-rank-empty {
  margin: 0.4rem 0.2rem;
  color: #a89888;
  font-size: 0.82rem;
}

.activity-unlocks {
  margin: 0 0 0.85rem;
  padding: 0.85rem 0.9rem 0.75rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff8f1, #fff);
  border: 1px solid #e2c4a8;
  box-shadow: 0 1px 4px rgba(196, 92, 38, 0.08);
}

.activity-unlocks-toggle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.activity-unlocks-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0;
}
.activity-unlocks-head-text { min-width: 0; flex: 1; }
.activity-unlocks-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 900;
  color: #4a3a2c;
}
.activity-unlocks-points {
  flex: 0 0 auto;
  padding-top: 0.02rem;
  font-size: 1.05rem;
  font-weight: 900;
  color: #c45c26;
}
.activity-unlocks-points-unit {
  margin-left: 0.12rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #8a6a4a;
}
.activity-unlocks-summary {
  margin: 0.18rem 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #8a6a4a;
}
.activity-unlocks-bar {
  height: 0.32rem;
  border-radius: 99px;
  background: #f0e6dc;
  overflow: hidden;
  margin: 0.55rem 0 0;
}
.activity-unlocks-bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #e8a06a, #c45c26);
}
.activity-unlocks-body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition: grid-template-rows 0.3s ease, opacity 0.22s ease, margin-top 0.3s ease;
}
.activity-unlocks-body-inner {
  overflow: hidden;
  min-height: 0;
}
.activity-unlocks.is-open .activity-unlocks-body {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 0.55rem;
}
@media (prefers-reduced-motion: reduce) {
  .activity-unlocks-body { transition: none; }
}
.activity-unlocks-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.activity-unlock-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.45rem 0.15rem;
  border-top: 1px solid #f0e6dc;
}
.activity-unlock-item:first-child { border-top: none; padding-top: 0.15rem; }
.activity-unlock-mark {
  flex: 0 0 1.35rem;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.08rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}
.activity-unlock-item.is-on .activity-unlock-mark { background: #e8f6ee; color: #2f9b63; }
.activity-unlock-item.is-next .activity-unlock-mark {
  background: #fff1e6;
  color: #c45c26;
  border: 1px solid #e2c4a8;
}
.activity-unlock-item.is-off .activity-unlock-mark { background: #f3eee8; color: #b8a090; }
.activity-unlock-body { min-width: 0; flex: 1; }
.activity-unlock-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
}
.activity-unlock-name {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 800;
  color: #4a3a2c;
}
.activity-unlock-item.is-off .activity-unlock-name { color: #7a6a5a; }
.activity-unlock-status {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 800;
}
.activity-unlock-item.is-on .activity-unlock-status { color: #2f9b63; }
.activity-unlock-item.is-next .activity-unlock-status,
.activity-unlock-item.is-off .activity-unlock-status { color: #8a6a4a; }
.activity-unlock-desc {
  margin: 0.12rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #8a6a4a;
}
.activity-unlocks-note {
  margin: 0.55rem 0 0;
  font-size: 0.7rem;
  line-height: 1.45;
  color: #a89888;
}

.mine-actions {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.mine-actions[hidden] { display: none !important; }
.mine-logout[hidden] { display: none !important; }
.mine-actions .primary { min-width: 7.5rem; }
.mine-actions .mine-logout { min-width: 7.5rem; color: #8a4a3a; border-color: #ecd5cc; }
.mine-settings-btn {
  flex: 0 0 auto;
  align-self: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid #eadfd3;
  border-radius: 50%;
  background: rgba(255, 250, 245, 0.92);
  color: #4a3a2c;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mine-settings-btn[hidden] { display: none !important; }
.mine-settings-btn:active { background: #f5e9dd; }
.mine-settings-ico {
  display: block;
  width: 24px;
  height: 24px;
  overflow: visible;
}
.mine-checkin {
  position: static;
  top: auto;
  right: auto;
  z-index: 3;
  margin: 0;
  margin-left: auto;
  box-sizing: border-box;
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  min-width: 0;
  min-height: calc(var(--mine-name-size, 1.12rem) * var(--mine-name-lh, 1.2));
  height: calc(var(--mine-name-size, 1.12rem) * var(--mine-name-lh, 1.2));
  padding: 0 0.65rem;
  border-radius: 999px;
  border: 1px solid #ead3a8;
  background: linear-gradient(180deg, #fffaf2, #f4e4c4);
  color: #8a5a18;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(232, 176, 58, 0.16);
  -webkit-tap-highlight-color: transparent;
}
.mine-checkin-bonus {
  font-size: 0.9em;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1;
  color: #c48a22;
}
.mine-checkin:active { background: #f0dfb8; }
.mine-checkin.is-done,
.mine-checkin[disabled] {
  background: #f4efe9;
  border-color: #e6ddd4;
  color: #9a8a7a;
  box-shadow: none;
  cursor: default;
}
.mine-checkin.is-done .mine-checkin-bonus,
.mine-checkin[disabled] .mine-checkin-bonus { display: none; }
.mine-checkin.is-busy { opacity: 0.7; pointer-events: none; }
.mine-checkin[hidden] { display: none !important; }
.mine-checkin-msg {
  position: static;
  z-index: 3;
  margin: 0.15rem 0 0;
  max-width: 100%;
  text-align: right;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8a6a3a;
}
.mine-checkin-msg.is-ok { color: #2f9b63; }
.mine-checkin-msg.is-err { color: #a33c32; }
.mine-checkin-msg[hidden] { display: none !important; }
.mine-edit-card { padding: 0.9rem 0.95rem 1rem; }
.mine-edit-form .mine-edit-avatar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}
.mine-edit-av-wrap {
  width: 4.2rem !important;
  height: 4.2rem !important;
}
.mine-pass-block {
  margin-top: 0.35rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  border: 1px dashed #e2d3c3;
  background: #fffaf5;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.mine-pass-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
}
.mine-works-card { padding: 0.85rem 0.75rem 1rem; }
.mine-works-card .section-head,
.mine-works-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0 0.2rem;
}
.mine-works-head-text { min-width: 0; flex: 1; }
.mine-publish-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0.38rem 0.85rem;
  font-size: 0.78rem;
}
.mine-works-card .feed-grid { margin-top: 0.25rem; };
.mine-works-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0 0.1rem;
  margin: 0 0 0.1rem;
}
.mine-works-tab {
  flex: 1;
  padding: 0.48rem 0.4rem;
  border-radius: 10px;
  color: #666;
  background: #fff;
  border: 1px solid #e5e5e5;
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1.2;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.mine-works-tab.is-on {
  color: #fff;
  background: #111;
  border-color: #111;
}
.mine-works-tab-count {
  margin: 0.4rem 0 0;
  padding: 0 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}
.mine-works-card .feed-grid[hidden],
.mine-works-tab-count[hidden] {
  display: none !important;
}

.mine-sug-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.72rem 1rem;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.sug-page-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--top-h);
  padding: 0.15rem 0.55rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
  width: 100%;
  box-sizing: border-box;
  z-index: 40;
}
.sug-page-head h1 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 900;
  min-width: 0;
  flex: 1;
}
.sug-back {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: #f3f3f3;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: #222;
  text-decoration: none;
  display: grid;
  place-items: center;
}
.sug-back:active { background: #e8e8e8; }
.sug-page-card { padding: 0.85rem 0.75rem 1rem; }
.sug-page-hint {
  margin: 0 0.2rem 0.7rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}
.sug-compose { display: grid; gap: 0.55rem; margin: 0 0.1rem 0.65rem; }
.sug-compose textarea {
  width: 100%;
  min-height: 4.2rem;
  resize: vertical;
  font-size: 16px;
  line-height: 1.45;
}
.sug-compose .row-actions { justify-content: flex-end; }
.sug-msg { margin: 0 0.2rem 0.45rem; }
.sug-msg.is-error { color: #b42318; }
.sug-msg[hidden] { display: none !important; }
.sug-list { display: grid; gap: 0.45rem; }
.sug-empty {
  margin: 0.15rem 0.2rem 0;
  padding: 0.65rem 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.sug-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.55rem 0.5rem 0.5rem;
  border-radius: 12px;
  background: #fffaf5;
  border: 1px solid #f0e4d8;
}
.sug-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.sug-user-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}
.sug-user {
  font-size: 0.78rem;
  font-weight: 800;
  color: #5a4638;
}
.sug-time {
  flex: 0 0 auto;
  font-size: 0.68rem;
  color: #a89888;
}
.sug-body {
  margin: 0.28rem 0 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  width: 100%;
}
.sug-like {
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  padding: 0.15rem 0.3rem;
  min-width: 40px;
  min-height: 40px;
  color: #bbb;
  font-family: inherit;
  flex: 0 0 auto;
}
.sug-like-ico::before {
  content: "♡";
  font-size: 1.05rem;
  line-height: 1;
  color: #c8c8c8;
}
.sug-like-n { font-size: 0.62rem; color: #aaa; font-weight: 700; }
.sug-like.is-liked .sug-like-ico::before {
  content: "♥";
  color: #ff2442;
}
.sug-like.is-liked .sug-like-n { color: #ff2442; }
.sug-item-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.2rem;
  flex: 0 0 auto;
  min-width: 52px;
}
.sug-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
  border: 1px solid #e8c4c0;
  background: #fff4f2;
  color: #a33c32;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  min-width: 52px;
  min-height: 32px;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}
.sug-del:active { background: #ffe0dc; }
.sug-del[hidden] { display: none !important; }
.sug-login-hint {
  margin: 0 0.2rem 0.55rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.sug-login-hint[hidden] { display: none !important; }
.sug-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #111;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  min-height: 32px;
}

@media (max-width: 420px) {
  .mine-hero { align-items: flex-start; }
  .mine-avatar-wrap { width: 4.1rem; height: 4.1rem; }
}
/* Curated promo feeds (本周热帖 / 同人精选 / 活动预告) */
.curated-head {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.65rem 0.35rem 0.35rem;
}
.curated-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
}
.curated-head p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}
.curated-back {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: #f3f3f3;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: #222;
}
.curated-back:active { background: #e8e8e8; }


/* ---- edit post ---- */
.card-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.2rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #ecd5cc;
  background: #fff8f4;
  color: #8a4a3a;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.card-edit-btn:hover { background: #ffe8dc; }
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.05rem;
}
.card-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.2rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #e8c4c0;
  background: #fff4f2;
  color: #a33c32;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.card-delete-btn:hover { background: #ffe0dc; }
.card-actions .card-edit-btn,
.card-actions .card-delete-btn,
.card-actions .card-likes-btn { margin-top: 0; }

.card-likes-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.2rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #ecd5cc;
  background: #fff8f4;
  color: #8a4a3a;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.card-likes-btn:hover { background: #ffe8dc; }

body.likes-sheet-open { overflow: hidden; }
.likes-sheet {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: max(1.25rem, env(safe-area-inset-top, 0px)) 1rem max(1.25rem, env(safe-area-inset-bottom, 0px));
}
body:has(.app-tabbar) .likes-sheet {
  padding-bottom: calc(var(--tabbar-h, 56px) + var(--safe-bottom, 0px) + 0.8rem);
}
.likes-sheet[hidden] { display: none !important; }
.likes-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 28, 18, 0.45);
}
.likes-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(32rem, 100%);
  max-height: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  background: #fffaf5;
  border-radius: 16px;
  padding: 0.9rem 1rem 1rem;
  box-shadow: 0 16px 40px rgba(40, 24, 10, 0.2);
}
.likes-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.likes-sheet-head h3,
.likes-sheet-title { margin: 0; font-size: 1rem; font-weight: 900; color: #4a3a2c; }
.likes-sheet-sub { margin: 0.25rem 0 0; font-size: 0.75rem; line-height: 1.45; color: #8a6a4a; }
.likes-sheet-close {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: #f3ebe3;
  color: #4a3a2c;
  font-size: 1.2rem;
  cursor: pointer;
}
.likes-sheet-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 3rem;
}
.likes-sheet-empty {
  margin: 0.4rem 0 0.2rem;
  font-size: 0.86rem;
  color: #8a6a4a;
  text-align: center;
}
.likes-sheet-empty.is-err { color: #a33c32; }
.likes-sheet-row {
  margin: 0;
  padding: 0;
}
.likes-sheet-main {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.15rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 10px;
}
.likes-sheet-main:active { opacity: 0.85; }
.likes-sheet-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.likes-sheet-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #4a3a2c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.likes-sheet-time {
  font-size: 0.75rem;
  color: #8a6a4a;
}

.card-vis-badge,
.post-vis-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.38rem;
  border-radius: 999px;
  border: 1px solid #ecd5cc;
  background: #fff8f4;
  color: #8a4a3a;
  font-size: 0.66rem;
  font-weight: 700;
  vertical-align: middle;
  letter-spacing: 0.02em;
}
.post-title .post-vis-badge { margin-left: 0.4rem; font-size: 0.7rem; }
.post-missing.is-private {
  color: rgba(255,255,255,0.82);
  font-weight: 700;
}
html.is-article .post-missing.is-private,
body.is-article .post-missing.is-private {
  color: #8a4a3a;
}

.upload-actions { display: flex; gap: 0.55rem; flex-wrap: wrap; align-items: center; }
.upload-actions .primary, .upload-actions .ghost { min-width: 7rem; }
#post-image-hint:not([hidden]) { display: block; margin: -0.15rem 0 0.1rem; color: var(--muted); }
.post-edit-btn {
  margin-left: auto;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.35);
  color: #fff;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.post-chrome { display: flex; align-items: center; gap: 0.5rem; }





/* ===== 图文分享详情：黑底页面 + 居中白底内容区；图和文都跟内容区走，不拉满整屏 ===== */
:is(html.is-article, body.post-page.is-article) {
  background: #0a0a0a;
  color: #111;
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  max-width: none;
}
:is(html.is-article, body.post-page.is-article).cmt-open,
body.post-page.is-article.cmt-open {
  overflow: hidden;
  height: 100%;
}
:is(html.is-article, body.post-page.is-article) .post-stage,
:is(html.is-article, body.post-page.is-article) .post-stage.is-article {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "chrome"
    "title"
    "media"
    "body";
  justify-content: stretch;
  align-content: start;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: visible;
  background: #fff;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  box-sizing: border-box;
}
:is(html.is-article, body.post-page.is-article) .post-chrome {
  grid-area: chrome;
  position: sticky;
  top: 0;
  left: auto;
  right: auto;
  width: 100%;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid #eee;
}
:is(html.is-article, body.post-page.is-article) .post-media {
  grid-area: media;
  position: relative !important;
  inset: auto !important;
  z-index: 1;
  width: 100%;
  max-width: none;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
  background: #f4f4f4;
}
:is(html.is-article, body.post-page.is-article) .post-album {
  position: relative;
  inset: auto;
  width: 100%;
}
:is(html.is-article, body.post-page.is-article) .post-album-track {
  height: auto;
}
:is(html.is-article, body.post-page.is-article) .post-album-slide {
  height: auto;
  background: #f4f4f4;
}
:is(html.is-article, body.post-page.is-article) .post-media img#post-image,
:is(html.is-article, body.post-page.is-article) .post-album-slide img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center top !important;
  border-radius: 0;
}
:is(html.is-article, body.post-page.is-article) .post-album.is-multi .post-album-slide {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}
:is(html.is-article, body.post-page.is-article) .post-album.is-multi .post-album-slide img {
  max-height: 70vh !important;
  margin: 0 auto;
}
:is(html.is-article, body.post-page.is-article) .post-album-dots {
  bottom: 0.7rem;
}
:is(html.is-article, body.post-page.is-article) .post-album-dot {
  background: rgba(0,0,0,0.25);
}
:is(html.is-article, body.post-page.is-article) .post-album-dot.is-on {
  background: #111;
}
:is(html.is-article, body.post-page.is-article) .post-caption {
  display: contents;
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: 2;
  pointer-events: auto;
  text-shadow: none;
}
:is(html.is-article, body.post-page.is-article) .post-title {
  grid-area: title;
  margin: 0.85rem 1.1rem 0.7rem;
  padding: 0;
  max-width: none;
  width: auto;
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.4;
  color: #111;
  text-shadow: none;
}
:is(html.is-article, body.post-page.is-article) .post-body {
  grid-area: body;
  margin: 0.9rem 1.1rem calc(2rem + var(--safe-bottom));
  padding: 0;
  max-width: none;
  width: auto;
  box-sizing: border-box;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.75;
  color: #222;
  opacity: 1;
  text-shadow: none;
  white-space: pre-wrap;
  word-break: break-word;
}
:is(html.is-article, body.post-page.is-article) .post-rail {
  grid-area: media;
  justify-self: end;
  align-self: end;
  position: relative;
  right: auto;
  bottom: auto;
  top: auto;
  z-index: 8;
  margin: 0 calc(0.55rem + var(--safe-right)) 0.85rem 0;
}
:is(html.is-article, body.post-page.is-article) .rail-btn {
  background: rgba(0,0,0,0.45);
  border-radius: 999px;
  padding: 0.35rem 0.45rem 0.28rem;
  color: #fff;
  text-shadow: none;
}
:is(html.is-article, body.post-page.is-article) .post-title[hidden],
:is(html.is-article, body.post-page.is-article) .post-body[hidden] {
  display: none !important;
}
/* 类型未定时先藏起来，避免先画出全屏黑底再切到图文 */
html:not(.is-article) body.post-page:not(.is-ready) .post-stage {
  visibility: hidden;
}

/* 抽奖：发帖表单、卡片角标、详情面板 */
.lottery-compose { display: grid; gap: 0.7rem; }
.lottery-compose[hidden] { display: none !important; }
.lottery-levels { display: grid; gap: 0.45rem; }
.lottery-level-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.2rem auto;
  gap: 0.4rem;
  align-items: center;
}
.lottery-level-count { text-align: center; }
.lottery-compose.is-locked .ghost { display: none; }
.card-cat-badge,
.card-lottery-badge {
  position: absolute; top: 0.4rem; left: 0.4rem; z-index: 2;
  display: inline-block; padding: 0.1rem 0.42rem; border-radius: 6px;
  color: #fff; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.02em;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.card-cat-badge[data-cat="抽奖"],
.card-lottery-badge {
  background: linear-gradient(135deg, #ff9a4a, #e07828);
}
.card-cat-badge[data-cat="分享"] {
  background: linear-gradient(135deg, #5ec1c9, #3a9aa3);
}
.card-cat-badge[data-cat="活动"],
.card-cat-badge[data-cat="闲趣"] {
  background: linear-gradient(135deg, #e8b04a, #c88a28);
}
.card-cat-badge[data-cat="攻略"] {
  background: linear-gradient(135deg, #3cbf9a, #2a9a7a);
}
.card-cat-badge[data-cat="同人"] {
  background: linear-gradient(135deg, #9b7aef, #7a58d4);
}
.card-cat-badge[data-cat="穿搭"] {
  background: linear-gradient(135deg, #f08ab0, #e05a88);
}
.card-cat-badge[data-cat="交友"] {
  background: linear-gradient(135deg, #5aa3f0, #3a7fd4);
}

.lottery-panel { display: none; }
.lottery-panel.is-on { display: block; }
.lottery-card {
  background: #fffaf4;
  color: #222;
  text-shadow: none;
  border: 1px solid #f0e2d0;
  border-radius: 14px;
  padding: 0.85rem 0.9rem 0.95rem;
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}
.lottery-body {
  margin: 0 0 0.7rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.7;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
}
.post-stage.has-lottery #post-body { display: none; }
/* 抽奖详情不展示作者头像、点赞、留言 */
.post-stage.has-lottery .post-rail,
.post-stage.has-lottery #post-author-chip {
  display: none !important;
}
.lottery-kicker {
  display: inline-block; padding: 0.1rem 0.45rem; border-radius: 6px; margin-bottom: 0.45rem;
  background: linear-gradient(135deg, #ff9a4a, #e07828); color: #fff;
  font-size: 0.68rem; font-weight: 800;
}
.lottery-time, .lottery-count, .lottery-meta {
  margin: 0 0 0.35rem; font-size: 0.82rem; font-weight: 700; color: #555;
}
.lottery-count { color: #e07828; font-weight: 800; }
.card-lottery-count {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  font-weight: 800;
  color: #e07828;
}
.lottery-prizes {
  list-style: none; margin: 0.35rem 0 0.65rem; padding: 0;
  display: grid; gap: 0.28rem;
}
.lottery-prizes li {
  display: flex; justify-content: space-between; gap: 0.6rem;
  padding: 0.35rem 0.5rem; background: #fff; border: 1px solid #f0e2d0; border-radius: 8px;
  font-size: 0.82rem; font-weight: 700;
}
.lottery-prizes span { color: #e07828; }
.lottery-people { margin: 0 0 0.65rem; }
.lottery-people-title {
  margin: 0 0 0.4rem;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: #555;
}
.lottery-people-title span { color: #e07828; font-size: 0.75rem; font-weight: 800; }
.lottery-people-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 7.4rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.lottery-person {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  max-width: 100%;
  padding: 0.16rem 0.5rem;
  background: #fff;
  border: 1px solid #f0e2d0;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #333;
}
.lottery-person.is-me {
  border-color: #e07828;
  background: #fff4e8;
  color: #9a4a12;
}
.lottery-person-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 6.8rem;
}
.lottery-person-me {
  flex: none;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: #e07828;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.45;
}
.lottery-results + .lottery-people { margin-top: 0.15rem; }
.lottery-actions { display: grid; gap: 0.35rem; margin-top: 0.35rem; }
.lottery-join { width: 100%; }
.lottery-join.is-joined, .lottery-join:disabled {
  background: #fff; color: #111; border: 1px solid #e5e5e5;
}
.lottery-msg { margin: 0.3rem 0; font-size: 0.78rem; color: var(--muted); }
.lottery-msg.is-err { color: var(--danger); }
.lottery-results { margin-top: 0.55rem; display: grid; gap: 0.55rem; }
.lottery-results-title { margin: 0; font-size: 0.95rem; font-weight: 900; }
.lottery-result-level h4 { margin: 0 0 0.25rem; font-size: 0.82rem; font-weight: 800; }
.lottery-winner, .lottery-left, .lottery-empty {
  margin: 0 0 0.2rem; font-size: 0.82rem; font-weight: 700;
}
.lottery-winner {
  display: flex; justify-content: space-between; gap: 0.4rem;
  padding: 0.32rem 0.5rem; border-radius: 8px; background: #fff; border: 1px solid #f0e2d0;
}
.lottery-winner.is-mine {
  border-color: #e07828; background: #fff4e8; color: #9a4a12;
}
.lottery-winner span { color: #e07828; font-weight: 800; font-size: 0.72rem; }
.lottery-left, .lottery-empty { color: var(--muted); font-weight: 700; }

body.post-page:not(.is-article) .lottery-panel.is-on {
  position: absolute;
  left: 0.7rem; right: 0.7rem;
  bottom: calc(1.05rem + var(--safe-bottom));
  z-index: 17;
  max-height: min(46vh, 440px);
  overflow: auto;
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
}
body.post-page:not(.is-article) .post-stage.has-lottery .post-caption {
  right: 0.85rem;
  bottom: calc(1.2rem + var(--safe-bottom) + min(46vh, 280px));
  max-height: 22vh;
  overflow: auto;
  pointer-events: auto;
}
body.post-page:not(.is-article) .post-stage.has-lottery .post-album-dots {
  bottom: calc(min(46vh, 280px) + 2.2rem + var(--safe-bottom));
}
body.post-page:not(.is-article) .post-stage.has-lottery .post-rail {
  bottom: calc(min(46vh, 280px) + 3.2rem + var(--safe-bottom));
}
body.post-page:not(.is-article) .post-stage.has-lottery .post-music {
  bottom: calc(min(46vh, 280px) + 1.15rem + var(--safe-bottom));
  right: 0.85rem;
}
body.post-page:not(.is-article) .lottery-panel .lottery-card {
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
  background: rgba(255,250,244,0.97);
}

:is(html.is-article, body.post-page.is-article) .post-stage,
:is(html.is-article, body.post-page.is-article) .post-stage.is-article {
  grid-template-areas:
    "chrome"
    "title"
    "media"
    "music"
    "body"
    "lottery";
}
:is(html.is-article, body.post-page.is-article) .post-music {
  grid-area: music;
  position: relative;
  left: auto; right: auto; bottom: auto;
  margin: 0.7rem 1.1rem 0;
  max-width: none;
  background: #f3f3f3;
  color: #111;
  backdrop-filter: none;
}
:is(html.is-article, body.post-page.is-article) .lottery-panel.is-on {
  grid-area: lottery;
  position: relative;
  left: auto; right: auto; bottom: auto;
  margin: 0.2rem 1.1rem calc(2rem + var(--safe-bottom));
  max-height: none;
  overflow: visible;
  z-index: 3;
}
:is(html.is-article, body.post-page.is-article) .post-body {
  margin-bottom: 0.4rem;
}

/* Chat */
.phone-frame:has(#view-chat.is-on) .app-top {
  display: none;
}
.app-main:has(#view-chat.is-on) {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
}
#view-chat.is-on {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  background: #fff;
  overflow: hidden;
}
.chat-shell {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  background: #fff;
  overflow: hidden;
}
.chat-list-pane, .chat-thread-pane {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  background: #fff;
  overflow: hidden;
}
.chat-thread-pane { background: #f5f5f5; position: relative; }
.chat-thread-pane[hidden], .chat-list-pane[hidden] { display: none !important; }
.chat-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 48px;
  padding: 0.2rem 0.7rem;
  border-bottom: 1px solid #f0f0f0;
  flex: 0 0 auto;
  background: #fff;
}
.chat-head-list { position: relative; justify-content: center; }
.chat-head h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.chat-head-actions {
  position: absolute;
  right: 0.35rem;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.05rem;
}
.chat-head,
.chat-head-thread,
.chat-head-list {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.chat-head-thread {
  justify-content: flex-start;
  gap: 0.15rem;
  position: sticky;
  top: 0;
  z-index: 45;
}
#chat-thread-av {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-width: 0;
}
.chat-thread-who {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.chat-thread-who h3 {
  font-size: 0.95rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-back {
  border: none;
  background: transparent;
  color: #111;
  font-size: 1.7rem;
  line-height: 1;
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  flex: 0 0 auto;
}
.chat-search {
  display: flex;
  gap: 0.4rem;
  padding: 0 0.9rem 0.65rem;
  background: #fff;
  flex: 0 0 auto;
}
.chat-search[hidden] { display: none !important; }
.chat-search input {
  flex: 1 1 auto;
  min-width: 0;
  background: #f4f4f4;
  border: none;
  border-radius: 18px;
  padding: 0.5rem 0.9rem;
  min-height: 2.15rem;
  font-family: inherit;
  font-size: 0.88rem;
}
.chat-search button {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: #111;
  font-weight: 700;
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0 0.15rem;
}
.chat-hint {
  margin: 0 0.95rem 0.15rem;
  min-height: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
}
.chat-hint:empty { display: none; }
.chat-hint.is-err { color: var(--danger); }
.chat-av-interact {
  background: linear-gradient(135deg, #ff6b7a, #ff2442);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.chat-av-head.chat-av-interact { font-size: 0.62rem; }
.chat-av-loria {
  background: linear-gradient(135deg, #6b8cff, #3b5bdb);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: #fff;
}
.chat-av-head.chat-av-loria { font-size: 0.72rem; }
.chat-av-guild {
  background: linear-gradient(135deg, #c99a5a, #8a5a2b);
  font-size: 0.82rem;
  color: #fff;
}
.chat-av-head.chat-av-guild { font-size: 0.68rem; }
.chat-shell.is-loria #chat-add-member,
.chat-shell.is-guild #chat-add-member {
  display: none !important;
}
.chat-official {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.32rem;
  border-radius: 999px;
  background: #edf1ff;
  color: #3b5bdb;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.2;
  vertical-align: middle;
}

.chat-conv.is-pin-end + .chat-conv {
  border-top: 6px solid #f4f4f4;
}
.chat-official-head {
  flex: 0 0 auto;
}
.chat-loria-welcome {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 1.5rem 1rem 0;
  padding: 0.9rem 0.95rem;
  background: #f6f8ff;
  border-radius: 1rem 1rem 1rem 0.3rem;
  color: #222;
  text-align: left;
}
.chat-loria-welcome-av {
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1rem;
  flex: 0 0 auto;
}
.chat-loria-welcome-name {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #222;
}
.chat-loria-welcome-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #333;
  font-weight: 500;
}
.chat-loria-welcome .chat-empty-sub {
  margin-top: 0.45rem;
  color: #888;
  opacity: 1;
  font-size: 0.78rem;
  font-weight: 400;
}
.chat-empty-sub {
  margin: 0.45em 0 0;
  opacity: 0.72;
  font-size: 0.92em;
}

.chat-official.chat-guild {
  background: #f8efe4;
  color: #8a5a2b;
}
.chat-conv.is-loria .chat-conv-name,
.chat-conv.is-guild .chat-conv-name { font-weight: 650; }
.chat-shell.is-interact .chat-composer,
.chat-shell.is-interact .chat-emoji-panel,
.chat-shell.is-interact #chat-add-member {
  display: none !important;
}
.chat-shell.is-interact .chat-msgs {
  padding-bottom: 1.2rem;
}
.chat-interact-bubble.js-interact-post { cursor: pointer; }
.chat-interact-bubble.js-interact-post.is-missing {
  cursor: default;
  opacity: 0.72;
}
.chat-interact-missing {
  margin: 0.28rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}
.chat-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h, 56px) + 1.2rem + var(--safe-bottom, 0px));
  transform: translateX(-50%) translateY(8px);
  z-index: 3300;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(40, 28, 18, 0.92);
  color: #fff8f0;
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: 86vw;
  text-align: center;
}
.chat-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.chat-interact-work {
  font-weight: 700;
  color: #111;
}
.chat-interact-cover {
  display: none !important;
}

/* 聊天页 · 互关用户横向头像栏 */
.chat-mutual-rail {
  flex: 0 0 auto;
  min-width: 0;
  padding: 0.55rem 0 0.5rem;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.chat-mutual-rail[hidden] { display: none !important; }
.chat-mutual-rail-scroller {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0 0.9rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chat-mutual-rail-scroller::-webkit-scrollbar { display: none; width: 0; height: 0; }
.chat-mutual-cell {
  flex: 0 0 auto;
  width: 3.4rem;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
  cursor: pointer;
}
.chat-mutual-cell:active { opacity: 0.72; }
.chat-mutual-av {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: #eee;
}
.chat-mutual-av.chat-av-fallback { font-size: 0.95rem; }
.chat-mutual-name {
  width: 100%;
  color: #333;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-conv-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.chat-empty {
  margin: 2.6rem 1.4rem;
  text-align: center;
  color: #b0b0b0;
  font-size: 0.86rem;
  font-weight: 500;
}
.chat-conv {
  width: 100%;
  border: none;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  border-bottom: 1px solid #f3f3f3;
}
.chat-conv:last-child { border-bottom: none; }
.chat-conv:active, .chat-conv:hover { background: #fafafa; }
.chat-av {
  width: 3rem; height: 3rem; border-radius: 50%;
  object-fit: cover; flex: 0 0 auto; background: #eee;
}
.chat-av-head { width: 1.85rem; height: 1.85rem; }
.chat-av-msg { width: 2.25rem; height: 2.25rem; }
.chat-av-fallback {
  display: grid; place-items: center;
  background: linear-gradient(135deg, #f0c14b, #e08a2a);
  color: #fff; font-weight: 800; font-size: 1rem;
}
.chat-av-head.chat-av-fallback { font-size: 0.7rem; }
.chat-av-msg.chat-av-fallback { font-size: 0.8rem; }
.chat-conv-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 0.22rem; }
.chat-conv-name {
  font-size: 0.95rem; font-weight: 700; color: #111;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-conv-preview {
  color: #9a9a9a; font-size: 0.78rem; font-weight: 400; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-conv-meta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0.55rem;
  min-width: 2.4rem;
  align-self: stretch;
  padding-top: 0.08rem;
}
.chat-conv-time { color: #c2c2c2; font-size: 0.7rem; font-weight: 400; line-height: 1; }
.chat-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  flex: 0 0 auto;
}
.chat-msgs {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.85rem 0.75rem 0.7rem;
  background: #f5f5f5;
  -webkit-overflow-scrolling: touch;
}
.chat-stamp {
  text-align: center;
  color: #b3b3b3;
  font-size: 0.7rem;
  font-weight: 400;
  margin: 0.25rem 0 0.8rem;
  max-width: 100%;
}
.chat-bubble-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0 0 0.8rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.chat-bubble-row.is-mine { justify-content: flex-end; }
.chat-bubble {
  flex: 0 1 auto;
  min-width: 0;
  max-width: calc(100% - 2.7rem);
  padding: 0.55rem 0.72rem;
  border-radius: 12px;
  background: #fff;
  color: #111;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.chat-bubble-row.is-mine .chat-bubble {
  background: #3d8aff;
  color: #fff;
}
/* 私聊里的分享帖子卡片：正文只显示可读标题，不露出标记注释 */
.chat-bubble.chat-shared-post-bubble,
.chat-bubble-row.is-mine .chat-bubble.chat-shared-post-bubble {
  padding: 0;
  background: transparent;
  color: #111;
  max-width: min(16rem, calc(100% - 2.7rem));
}
.chat-bubble .chat-shared-caption {
  margin: 0 0 0.35rem;
  color: #111;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-shared-post-card {
  display: block;
  width: 15rem;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  background: #fff;
  color: #111;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
}
.chat-shared-post-card:active { opacity: 0.82; }
.chat-shared-post-cover {
  display: block;
  width: 100%;
  height: 8rem;
  object-fit: cover;
  background: #f1f1f1;
}
.chat-shared-post-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 0.6rem 0.7rem;
  color: #111;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
}
.chat-shared-post-card.is-no-cover .chat-shared-post-title {
  padding: 0.72rem;
}
.chat-bubble p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-thread-pane > .chat-hint {
  margin: 0 0.9rem 0.15rem;
  background: #fff;
}
.chat-composer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid #ececec;
  background: #fff;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  position: sticky;
  bottom: 0;
  z-index: 45;
}
.chat-composer input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  background: #f3f3f3;
  border: none;
  border-radius: 20px;
  padding: 0.55rem 0.95rem;
  min-height: 2.25rem;
  font-family: inherit;
  font-size: 16px;
}
.chat-send {
  flex: 0 0 auto;
  border: none;
  background: #3d8aff;
  color: #fff;
  border-radius: 16px;
  padding: 0.4rem 0.9rem;
  min-height: 2.15rem;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}
.chat-send:disabled { opacity: 0.55; }
.chat-tool {
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #4a4a4a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.chat-tool svg { display: block; }
.chat-tool:active { background: #f0f0f0; }
.chat-tool.is-on { color: #3d8aff; }
.chat-composer { flex-wrap: nowrap; }
.chat-emoji-panel {
  flex: 0 0 auto;
  width: 100%;
  max-height: min(42vh, 280px);
  overflow: auto;
  padding: 0.45rem 0.55rem 0.7rem;
  background: #fff;
  border-top: 1px solid #ececec;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}
.chat-emoji-panel[hidden] { display: none !important; }
.chat-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.1rem;
}
@media (min-width: 720px) {
  .chat-emoji-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}
.chat-emoji-item {
  appearance: none;
  border: none;
  background: transparent;
  margin: 0;
  padding: 0.22rem 0;
  min-height: 2.15rem;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.chat-emoji-item:active { background: #f3f3f3; }
.chat-bubble.is-emoji p {
  font-size: 1.85rem;
  line-height: 1.2;
}
.chat-bubble.is-image {
  padding: 0;
  background: transparent;
  overflow: hidden;
  max-width: min(14.5rem, calc(100% - 2.7rem));
  box-shadow: none;
}
.chat-bubble-row.is-mine .chat-bubble.is-image {
  background: transparent;
}

.chat-composer.is-voice #chat-input,
.chat-composer.is-voice #chat-send { display: none !important; }
.chat-hold {
  display: none;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: none;
  border-radius: 20px;
  background: #f3f3f3;
  color: #333;
  min-height: 2.25rem;
  padding: 0.45rem 0.8rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.chat-composer.is-voice .chat-hold:not([hidden]),
.chat-hold.is-on:not([hidden]) { display: flex; }
.chat-hold[hidden] { display: none !important; }
.chat-hold.is-armed { background: #e8e8e8; }
.chat-hold.is-cancel { background: #fbe6e6; color: #c0392b; }
.chat-voice-kb-ico[hidden],
.chat-voice-mic-ico[hidden] { display: none !important; }
.chat-composer.is-voice #chat-voice-btn .chat-voice-mic-ico { display: none !important; }
.chat-composer.is-voice #chat-voice-btn .chat-voice-kb-ico { display: block !important; }
.chat-record-mask {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 16, 12, 0.28);
  pointer-events: none;
}
.chat-record-mask[hidden] { display: none !important; }
.chat-record-card {
  min-width: 8.6rem;
  padding: 1.1rem 1.2rem 0.95rem;
  border-radius: 16px;
  background: rgba(40, 28, 18, 0.92);
  color: #fff8f0;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
}
.chat-record-card.is-cancel { background: rgba(160, 40, 36, 0.94); }
.chat-record-ico {
  width: 2.4rem;
  height: 2.4rem;
  margin: 0 auto 0.45rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.14) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='9' y='3.5' width='6' height='11' rx='3' fill='none' stroke='%23fff8f0' stroke-width='1.7'/><path d='M6.6 11.4a5.4 5.4 0 0 0 10.8 0' fill='none' stroke='%23fff8f0' stroke-width='1.7' stroke-linecap='round'/><path d='M12 16.8v3.2' fill='none' stroke='%23fff8f0' stroke-width='1.7' stroke-linecap='round'/><path d='M9.2 20h5.6' fill='none' stroke='%23fff8f0' stroke-width='1.7' stroke-linecap='round'/></svg>") center / 1.35rem no-repeat;
}
.chat-record-time {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.chat-record-tip {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.88;
}
.chat-voice-wrap {
  display: flex;
  align-items: center;
  gap: 0.34rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: calc(100% - 2.7rem);
  overflow: visible;
}
.chat-bubble-col .chat-voice-wrap { max-width: 100%; }
.chat-bubble.is-voice {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.32rem;
  position: relative;
  min-width: 4.2rem;
  min-height: 2.5rem;
  width: var(--chat-voice-w, 5.2rem);
  max-width: min(13rem, 100%);
  padding: 0.42rem 0.9rem 0.42rem 0.7rem;
  border: none;
  border-radius: 8px;
  background: #ebebeb;
  color: #111;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  line-height: 1;
  overflow: visible;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.chat-bubble.is-voice::before {
  content: "";
  position: absolute;
  top: 0.72rem;
  width: 7px;
  height: 7px;
  background: inherit;
  transform: rotate(45deg);
  pointer-events: none;
}
.chat-bubble-row:not(.is-mine) .chat-bubble.is-voice {
  flex-direction: row;
  justify-content: flex-start;
  width: calc(var(--chat-voice-w, 5.2rem) + 0.45rem);
  padding: 0.48rem 1rem 0.48rem 0.7rem;
  border: none;
  border-radius: 8px;
  background: #ebebeb;
  color: #111;
}
.chat-bubble-row:not(.is-mine) .chat-bubble.is-voice::before {
  left: -3px;
  background: #ebebeb;
}
.chat-bubble-row.is-mine .chat-bubble.is-voice {
  flex-direction: row-reverse;
  justify-content: flex-start;
  background: #95ec69;
  color: #111;
  border: none;
  border-radius: 8px;
  padding: 0.4rem 0.82rem;
}
.chat-bubble-row.is-mine .chat-bubble.is-voice::before {
  right: -3px;
  background: #95ec69;
}
.chat-voice-ico {
  width: 1.05rem;
  height: 1.25rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: none;
  color: inherit;
}
.chat-bubble-row.is-mine .chat-voice-ico { background: none; }
.chat-voice-ico svg {
  width: 1.05rem;
  height: 1.25rem;
  display: block;
}
/* 收到的 )) 朝右对着时长，发出的 (( 朝左对着时长 */
.chat-bubble-row:not(.is-mine) .chat-voice-ico svg { transform: none; }
.chat-bubble-row.is-mine .chat-voice-ico svg { transform: scaleX(-1); }
.chat-voice-dur {
  flex: 0 0 auto;
  font-size: 0.94rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
  text-align: left;
  color: #111;
}
.chat-bubble-row:not(.is-mine) .chat-voice-dur,
.chat-bubble-row.is-mine .chat-voice-dur { text-align: left; color: #111; }
.chat-voice-unread {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red, #ff2442);
  box-shadow: none;
}
.chat-voice-arc { opacity: 1; }
.chat-bubble.is-voice.is-playing .chat-voice-arc-1 { animation: chat-voice-wave 1s steps(2, end) infinite; }
.chat-bubble.is-voice.is-playing .chat-voice-arc-2 { animation: chat-voice-wave 1s steps(2, end) infinite 0.22s; }
@keyframes chat-voice-wave {
  0%, 100% { opacity: 0.2; }
  45% { opacity: 1; }
}
.chat-bubble-img-btn {
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  width: 100%;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}
.chat-bubble-img {
  display: block;
  width: 100%;
  max-height: 16rem;
  object-fit: cover;
  border-radius: 10px;
  background: #e8e8e8;
  vertical-align: middle;
}
.chat-img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 4200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.4rem 1rem 1.4rem;
  box-sizing: border-box;
}
.chat-img-lightbox[hidden] { display: none !important; }
.chat-img-lightbox-scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.88);
}
.chat-img-lightbox-img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}
.chat-img-lightbox-close {
  position: absolute;
  top: calc(0.55rem + var(--safe-top, 0px));
  right: 0.7rem;
  z-index: 2;
  width: 2.1rem;
  height: 2.1rem;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.chat-img-lightbox-close:active { background: rgba(255,255,255,0.28); }
body.chat-img-lightbox-open { overflow: hidden; }
.chat-head-thread > .icon-btn {
  margin-left: auto;
  flex: 0 0 auto;
}
.chat-av-stack {
  display: grid;
  gap: 1px;
  background: #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 auto;
  box-sizing: border-box;
}
.chat-av-stack .chat-av,
.chat-av-stack .chat-av-fallback {
  width: 100%;
  height: 100%;
  border-radius: 0;
  min-width: 0;
  min-height: 0;
}
.chat-av-stack-2 { grid-template-columns: 1fr 1fr; }
.chat-av-stack-3,
.chat-av-stack-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.chat-av-stack-3 > :first-child { grid-column: 1 / -1; }
.chat-av-stack.chat-av,
.chat-av-stack.chat-av-head,
.chat-av-stack.chat-av-msg {
  background: #ececec;
}
.chat-av-stack.chat-av { width: 3rem; height: 3rem; }
.chat-av-stack.chat-av-head { width: 1.85rem; height: 1.85rem; border-radius: 6px; }
.chat-av-stack.chat-av-msg { width: 2.25rem; height: 2.25rem; border-radius: 7px; }
.chat-sender-name {
  display: block;
  color: #9a9a9a;
  font-size: 0.68rem;
  font-weight: 500;
  margin: 0 0 0.18rem 0.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.chat-bubble-col {
  flex: 0 1 auto;
  min-width: 0;
  max-width: calc(100% - 2.7rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.chat-bubble-col .chat-bubble {
  max-width: 100%;
}
.chat-sys {
  text-align: center;
  color: #b3b3b3;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.5;
  margin: 0.15rem 0.6rem 0.75rem;
  overflow-wrap: anywhere;
}
.chat-shell.is-adding .chat-composer,
.chat-shell.is-adding .chat-emoji-panel,
.chat-shell.is-adding #chat-thread-hint {
  visibility: hidden;
  pointer-events: none;
}
.chat-add-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.38);
  z-index: 80;
}
.chat-add-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 81;
  min-height: 58%;
  max-height: 82%;
  background: #fff;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.12);
  animation: sheetUp 0.22s ease-out;
  padding-bottom: var(--safe-bottom, 0px);
  box-sizing: border-box;
}
.chat-add-scrim[hidden],
.chat-add-sheet[hidden] { display: none !important; }
.chat-add-head {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.2rem 0.7rem;
  border-bottom: 1px solid #f0f0f0;
}
.chat-add-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
}
.chat-add-cancel,
.chat-add-done {
  position: absolute;
  top: 0;
  bottom: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0 0.35rem;
}
.chat-add-cancel { left: 0.55rem; color: #666; }
.chat-add-done { right: 0.55rem; color: #3d8aff; }
.chat-add-done:disabled { color: #c5c5c5; cursor: default; }
.chat-add-search { padding-top: 0.65rem; }
.chat-add-results {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 0 0.6rem;
  -webkit-overflow-scrolling: touch;
}
.chat-add-empty {
  margin: 1.6rem 1.2rem;
  text-align: center;
  color: #b0b0b0;
  font-size: 0.84rem;
  font-weight: 500;
}
.chat-add-row {
  width: 100%;
  border: none;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.chat-add-row:active,
.chat-add-row:hover { background: #fafafa; }
.chat-add-row.is-disabled {
  opacity: 0.55;
  cursor: default;
}
.chat-add-row.is-disabled:hover { background: #fff; }
.chat-add-row .chat-av { width: 2.5rem; height: 2.5rem; }
.chat-add-meta { flex: 1 1 auto; min-width: 0; display: grid; gap: 0.12rem; }
.chat-add-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-add-uid {
  color: #9a9a9a;
  font-size: 0.74rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-add-mark {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 1.6px solid #d0d0d0;
  box-sizing: border-box;
  position: relative;
  background: #fff;
}
.chat-add-row.is-on .chat-add-mark {
  border-color: #3d8aff;
  background: #3d8aff;
}
.chat-add-row.is-on .chat-add-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 0.28rem;
  height: 0.5rem;
  border: solid #fff;
  border-width: 0 1.8px 1.8px 0;
  transform: translate(-50%, -55%) rotate(45deg);
}
.chat-add-row.is-disabled .chat-add-mark {
  border-color: #e2e2e2;
  background: #f3f3f3;
}
.chat-add-tag {
  flex: 0 0 auto;
  color: #b0b0b0;
  font-size: 0.72rem;
  font-weight: 500;
}
#chat-unread-badge[hidden] { display: none !important; }

#view-suggestions.is-on {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
#view-suggestions .sug-page-head {
  position: sticky;
  top: 0;
}
#view-suggestions .sug-page-card {
  margin: 0.7rem 0.75rem 1rem;
}
button.sug-back {
  font-family: inherit;
  padding: 0;
}

#edit-nickname[readonly] {
  background: #f4f1ec;
  color: #666;
  cursor: default;
  box-shadow: none;
}


/* User homepage + clickable avatars (11k preview; cache 20261111k) */
.js-user-home { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.card-author.js-user-home,
.post-author-chip.js-user-home,
.rail-av.js-user-home,
.cmt-av.js-user-home,
.cmt-user.js-user-home,
.chat-av.js-user-home { cursor: pointer; }
body.user-page .user-page-head { flex: 0 0 auto; }

body.user-page .user-profile-fields {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #e2d3c3;
}
body.user-page .user-profile-fields[hidden] { display: none !important; }
body.user-page .user-field-label {
  margin: 0 0 0.28rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #8a6a4a;
}
body.user-page .user-field-body {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #4a3a2c;
}
body.user-page .user-field-empty,
body.user-page .user-field-body.user-field-empty {
  margin: 0;
  color: #a89888;
  font-size: 0.78rem;
  font-weight: 500;
}
body.user-page .mine-tags { margin-top: 0; }

/* Avatar lightbox (header avatars on 我的 / user.html; cache 20261111k) */
.mine-avatar-wrap.is-previewable { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.avatar-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.4rem 1.2rem;
  box-sizing: border-box;
}
.avatar-lightbox[hidden] { display: none !important; }
.avatar-lightbox-scrim {
  position: absolute;
  inset: 0;
  background: rgba(40, 28, 18, 0.72);
}
.avatar-lightbox-stage {
  position: relative;
  z-index: 1;
  width: min(82vw, 72vh, 26rem);
  height: min(82vw, 72vh, 26rem);
}
.avatar-lightbox-img,
.avatar-lightbox-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(145deg, #f7ebe0, #efe0d2);
  border: 4px solid #fffaf5;
  box-shadow: 0 16px 40px rgba(40, 24, 10, 0.28);
  box-sizing: border-box;
}
.avatar-lightbox-fallback {
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 4.4rem;
  color: #7a5a3a;
}
.avatar-lightbox-img[hidden],
.avatar-lightbox-fallback[hidden] { display: none !important; }
.avatar-lightbox-close {
  position: absolute;
  top: calc(0.65rem + env(safe-area-inset-top, 0px));
  right: calc(0.65rem + env(safe-area-inset-right, 0px));
  z-index: 2;
  width: 2.2rem;
  height: 2.2rem;
  border: none;
  border-radius: 50%;
  background: #fffaf5;
  color: #4a3a2c;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(40, 24, 10, 0.18);
}
.avatar-lightbox-close:active { background: #f3ebe3; }
body.avatar-lightbox-open { overflow: hidden; }

/* 活跃度解锁：主页背景、社区标识、发帖加精、排行榜展示框 */
.mine-nick,
.activity-rank-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.28rem 0.4rem;
}
.mine-nick-text { min-width: 0; }
.community-badge-slot {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.community-badge-slot:empty { display: none; }

.yy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  flex: 0 0 auto;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  font-family: var(--sans);
}
.yy-badge-mark { font-weight: 900; }
.yy-badge-name { font-weight: 800; letter-spacing: 0.04em; }

.yy-badge-jade {
  padding: 0.08rem 0.38rem 0.08rem 0.12rem;
  border-radius: 999px;
  background: linear-gradient(165deg, #d9efe4, #7fb89a 55%, #4e8f74);
  border: 1px solid #d7eee3;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 0 0 1px rgba(196, 168, 90, 0.35);
  color: #17392c;
}
.yy-badge-jade .yy-badge-mark {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #f3fff8, #b7ddc8 45%, #5e9a7e);
  border: 1px solid rgba(215, 196, 120, 0.7);
  font-size: 0.62rem;
  color: #1b4a36;
}
.yy-badge-jade .yy-badge-name { font-size: 0.6rem; color: #234a38; }

.yy-badge-seal {
  padding: 0.12rem 0.22rem 0.1rem;
  border-radius: 2px;
  background: #c4452b;
  color: #fff6e8;
  box-shadow: inset 0 0 0 1px rgba(255, 226, 196, 0.55), 0 1px 2px rgba(120, 32, 16, 0.25);
  transform: rotate(-6deg);
}
.yy-badge-seal .yy-badge-mark {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(80, 16, 8, 0.25);
}
.yy-badge-seal .yy-badge-name {
  display: none;
}

.yy-badge-cloud {
  padding: 0.14rem 0.48rem 0.16rem;
  border-radius: 1.1rem 1.1rem 0.85rem 1.2rem;
  background: linear-gradient(180deg, #fffaf0, #f3e2bc);
  border: 1px solid #d7b56a;
  box-shadow: 0 0 0 2px rgba(232, 176, 58, 0.18), inset 0 1px 0 #fff;
  color: #8a5a18;
  position: relative;
}
.yy-badge-cloud .yy-badge-mark { font-size: 0.66rem; color: #c45c26; }
.yy-badge-cloud .yy-badge-name { font-size: 0.58rem; color: #8a5a18; }

.yy-badge-tassel {
  padding: 0.06rem 0.28rem 0.22rem;
  border-radius: 3px 3px 6px 6px;
  background: linear-gradient(180deg, #f3d27a, #d4a24a 58%, #b8893d);
  border: 1px solid #c49a3a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
  color: #4a320e;
  position: relative;
}
.yy-badge-tassel .yy-badge-mark { font-size: 0.66rem; }
.yy-badge-tassel .yy-badge-name { font-size: 0.56rem; }
.yy-badge-tassel::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.42rem;
  width: 1px;
  height: 0.42rem;
  background: linear-gradient(#b8893d, #c45c26);
  transform: translateX(-50%);
}
.yy-badge-tassel::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.62rem;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3d27a, #c45c26);
  transform: translateX(-50%);
  box-shadow: 0 1px 1px rgba(80, 40, 10, 0.2);
}

.mine-profile-card.has-custom-bg,
.user-page .mine-profile-card.has-custom-bg {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  isolation: isolate;
}
.mine-profile-card.has-custom-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}
.mine-profile-card.has-bg-color::before {
  background: linear-gradient(180deg, rgba(255,250,245,0.28), rgba(255,250,245,0.55));
}
.mine-profile-card.has-bg-image::before {
  background: linear-gradient(180deg, rgba(255,248,241,0.55), rgba(255,250,245,0.82));
}
.mine-profile-card.has-custom-bg > * { position: relative; z-index: 1; }

.unlock-set {
  margin-top: 0.55rem;
  padding: 0.55rem 0.6rem 0.5rem;
  border-radius: 10px;
  background: #fffaf5;
  border: 1px solid #f0e0d0;
}
.unlock-set-label {
  margin: 0.45rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #8a6a4a;
}
.unlock-set-note {
  margin: 0.45rem 0 0;
  font-size: 0.7rem;
  line-height: 1.45;
  color: #8a6a4a;
}
.unlock-set-note.is-on-note { color: #2f9b63; font-weight: 700; }
.unlock-set-note.is-err { color: var(--danger, #e34545); }
.unlock-set-actions { margin-top: 0.45rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }

.unlock-seg {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}
.unlock-seg-btn {
  flex: 1;
  border: 1px solid #e8d5c4;
  background: #fff;
  color: #8a5a32;
  border-radius: 999px;
  padding: 0.28rem 0.5rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}
.unlock-seg-btn.is-on {
  background: #c45c26;
  border-color: #c45c26;
  color: #fff;
}

.unlock-color-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4a3a2c;
}
.unlock-color-label input[type="color"] {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid #e8d5c4;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.unlock-hex {
  width: 6.2rem;
  margin-left: 0.4rem;
  padding: 0.28rem 0.4rem;
  border: 1px solid #e8d5c4;
  border-radius: 8px;
  font: inherit;
  font-size: 0.78rem;
  color: #4a3a2c;
}
.unlock-bg-color, .unlock-bg-image {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.unlock-bg-image[hidden], .unlock-bg-color[hidden] { display: none !important; }
.unlock-file { margin: 0; }
.unlock-bg-thumb {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  border: 1px solid #e8d5c4;
}

.unlock-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: #4a3a2c;
  cursor: pointer;
}
.unlock-switch input { width: 1.05rem; height: 1.05rem; accent-color: #c45c26; }

.unlock-style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.unlock-style-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-height: 3.6rem;
  padding: 0.4rem 0.3rem 0.35rem;
  border-radius: 10px;
  border: 1px solid #eadfd3;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.unlock-style-card.is-on {
  border-color: #c45c26;
  box-shadow: 0 0 0 2px rgba(196, 92, 38, 0.18);
  background: #fff8f1;
}
.unlock-style-card b {
  font-size: 0.68rem;
  font-weight: 800;
  color: #6a4a32;
}
.unlock-style-card.feat-preview i {
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* 4 种精选样式预览块 */
.unlock-style-card.feat-seal i,
.card-feature-badge.feat-seal,
.post-feature-badge.feat-seal {
  display: inline-block;
  padding: 0.12rem 0.32rem;
  background: #c4452b;
  color: #fff6e8;
  border: 1px solid #f0c9b4;
  box-shadow: inset 0 0 0 1px rgba(255,226,196,0.4);
  transform: rotate(-8deg);
  letter-spacing: 0.12em;
  font-weight: 900;
  font-size: 0.66rem;
}
.unlock-style-card.feat-ribbon i,
.card-feature-badge.feat-ribbon,
.post-feature-badge.feat-ribbon {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  background: linear-gradient(180deg, #f3d27a, #d4a24a);
  color: #4a320e;
  clip-path: polygon(0 0, 100% 0, 88% 50%, 100% 100%, 0 100%, 12% 50%);
  font-weight: 900;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}
.unlock-style-card.feat-lantern i,
.card-feature-badge.feat-lantern,
.post-feature-badge.feat-lantern {
  display: inline-block;
  padding: 0.16rem 0.42rem 0.2rem;
  border-radius: 40% 40% 46% 46%;
  background: radial-gradient(circle at 50% 20%, #fff4d2, #e8b03a 58%, #c45c26);
  color: #4a2a10;
  box-shadow: 0 0 0 2px rgba(196, 92, 38, 0.18), 0 4px 10px rgba(196, 92, 38, 0.2);
  font-weight: 900;
  font-size: 0.64rem;
}
.unlock-style-card.feat-ink i,
.card-feature-badge.feat-ink,
.post-feature-badge.feat-ink {
  display: inline-block;
  padding: 0.08rem 0.42rem 0.12rem;
  background: transparent;
  color: #1a1a1a;
  border-bottom: 2px solid #1a1a1a;
  font-weight: 900;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-shadow: 0 0 0 #000, 1px 1px 0 rgba(0,0,0,0.08);
}

.card.is-featured { position: relative; }
.card-feature-badge {
  position: absolute;
  z-index: 3;
  top: 0.45rem;
  left: 0.45rem;
}
.card.feat-seal {
  box-shadow: 0 0 0 1px rgba(196, 69, 43, 0.25), 0 1px 3px rgba(0,0,0,0.04);
}
.card.feat-ribbon .card-media::after {
  content: "";
  position: absolute;
  top: 0.7rem;
  right: -0.15rem;
  width: 0.42rem;
  height: 1.6rem;
  background: linear-gradient(180deg, #f3d27a, #c45c26);
  border-radius: 2px 0 0 2px;
  z-index: 2;
}
.card.feat-ribbon { outline: 1px solid rgba(212, 162, 74, 0.45); outline-offset: -1px; }
.card.feat-lantern {
  box-shadow: 0 0 0 2px rgba(232, 176, 58, 0.45), 0 8px 18px rgba(196, 92, 38, 0.12);
  border-radius: 14px;
}
.card.feat-lantern .card-media { border-radius: 12px 12px 0 0; }
.card.feat-ink {
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, transparent 0 8px, #1a1a1a 8px 10px, transparent 10px) 0 0 / 18px 18px no-repeat,
    linear-gradient(225deg, transparent 0 8px, #1a1a1a 8px 10px, transparent 10px) 100% 0 / 18px 18px no-repeat,
    linear-gradient(45deg, transparent 0 8px, #1a1a1a 8px 10px, transparent 10px) 0 100% / 18px 18px no-repeat,
    linear-gradient(315deg, transparent 0 8px, #1a1a1a 8px 10px, transparent 10px) 100% 100% / 18px 18px no-repeat,
    #fff;
  box-shadow: inset 0 0 0 1px rgba(26,26,26,0.35);
}

.card-media { position: relative; }

.card-feature-btn {
  margin-top: 0;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  border: 1px solid #e2c4a8;
  background: #fffaf5;
  color: #8a5a32;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}
.card-feature-btn.is-on {
  background: #c45c26;
  border-color: #c45c26;
  color: #fff;
}
.card-feature-btn.is-disabled,
.card-feature-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f3eee8;
  color: #8a6a4a;
}

.post-feature-badge {
  display: inline-block;
  margin-left: 0.4rem;
  vertical-align: middle;
}
body.post-feat-seal #post-stage,
#post-stage.feat-seal {
  box-shadow: inset 0 0 0 3px rgba(196, 69, 43, 0.28);
}
body.post-feat-ribbon #post-caption,
#post-stage.feat-ribbon #post-caption {
  background-image: linear-gradient(90deg, rgba(243, 210, 122, 0.28), transparent 42%);
}
body.post-feat-lantern #post-stage,
#post-stage.feat-lantern {
  box-shadow: 0 0 0 3px rgba(232, 176, 58, 0.4), 0 10px 28px rgba(196, 92, 38, 0.16);
}
body.post-feat-ink #post-title,
#post-stage.feat-ink #post-title {
  border-bottom: 2px solid #1a1a1a;
  padding-bottom: 0.2rem;
}

.activity-rank-row.has-rank-frame {
  position: relative;
  border: 2px solid #d4a24a;
  background:
    linear-gradient(#fffdf8, #fff8f1) padding-box,
    linear-gradient(135deg, #f3d27a, #c45c26 42%, #d4a24a) border-box;
  box-shadow: 0 0 0 1px rgba(196, 92, 38, 0.12), 0 4px 12px rgba(180, 110, 30, 0.12);
}
.activity-rank-row.has-rank-frame::before,
.activity-rank-row.has-rank-frame::after {
  content: "";
  position: absolute;
  width: 0.7rem;
  height: 0.7rem;
  pointer-events: none;
}
.activity-rank-row.has-rank-frame::before {
  top: 0.18rem;
  left: 0.18rem;
  border-top: 2px solid #c45c26;
  border-left: 2px solid #c45c26;
}
.activity-rank-row.has-rank-frame::after {
  bottom: 0.18rem;
  right: 0.18rem;
  border-bottom: 2px solid #c45c26;
  border-right: 2px solid #c45c26;
}
.activity-rank-row.has-rank-frame.is-me {
  background: linear-gradient(180deg, #fff6ea, #fff);
  border-color: #c45c26;
}

/* 解锁设置弹层、标识与精选样式（配合 unlocks.js） */
.has-home-bg {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  isolation: isolate;
}
.has-home-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(180deg, rgba(255,248,241,0.5), rgba(255,250,245,0.82));
}
.has-home-bg > * { position: relative; z-index: 1; }
.has-home-bg.is-home-bg-dark::before {
  background: linear-gradient(180deg, rgba(255,248,241,0.72), rgba(255,250,245,0.9));
}

.community-badge,
.yy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.16rem;
  flex: 0 0 auto;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}
.community-badge.is-seal,
.yy-badge-seal {
  padding: 0.12rem 0.22rem 0.1rem;
  border-radius: 2px;
  background: #c4452b;
  color: #fff6e8;
  box-shadow: inset 0 0 0 1px rgba(255, 226, 196, 0.55), 0 1px 2px rgba(120, 32, 16, 0.25);
  transform: rotate(-6deg);
}
.community-badge.is-jade,
.yy-badge-jade { transform: none; }
.community-badge.is-orchid,
.yy-badge-orchid {
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 25%, #fff6d8, #f3d27a 42%, #e8b03a);
  border: 1px solid #d4a24a;
  color: #6a3e10;
  box-shadow: 0 0 0 2px rgba(232, 176, 58, 0.2);
  transform: none;
}
.community-badge.is-ink,
.yy-badge-ink {
  padding: 0.08rem 0.36rem 0.1rem;
  border-radius: 50%;
  width: 1.35rem;
  height: 1.35rem;
  justify-content: center;
  background: #f4efe6;
  border: 1px dashed #1a1a1a;
  color: #1a1a1a;
  box-shadow: none;
  transform: none;
}
.community-badge.is-ink .yy-badge-name,
.yy-badge-ink .yy-badge-name { display: none; }
.community-badge.is-seal .yy-badge-name,
.yy-badge-seal .yy-badge-name { display: none; }

.unlock-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h, 56px) + 1.2rem + var(--safe-bottom, 0px));
  transform: translateX(-50%) translateY(8px);
  z-index: 3200;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(40, 28, 18, 0.92);
  color: #fff8f0;
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: 86vw;
  text-align: center;
}
.unlock-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
body.unlock-sheet-open { overflow: hidden; }

.unlock-sheet {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: max(1.25rem, env(safe-area-inset-top, 0px)) 1rem max(1.25rem, env(safe-area-inset-bottom, 0px));
}
body:has(.app-tabbar) .unlock-sheet {
  padding-bottom: calc(var(--tabbar-h, 56px) + var(--safe-bottom, 0px) + 0.8rem);
}
.unlock-sheet[hidden] { display: none !important; }
.unlock-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 28, 18, 0.45);
}
.unlock-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(32rem, 100%);
  max-height: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  background: #fffaf5;
  border-radius: 16px;
  padding: 0.9rem 1rem 1rem;
  box-shadow: 0 16px 40px rgba(40, 24, 10, 0.2);
}
.unlock-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.unlock-sheet-title { margin: 0; font-size: 1rem; font-weight: 900; color: #4a3a2c; }
.unlock-sheet-sub { margin: 0.25rem 0 0; font-size: 0.75rem; line-height: 1.45; color: #8a6a4a; }
.unlock-sheet-close {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: #f3ebe3;
  color: #4a3a2c;
  font-size: 1.2rem;
  cursor: pointer;
}
.unlock-sheet-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}
.unlock-tabs { display: flex; gap: 0.35rem; margin-bottom: 0.65rem; }
.unlock-tab {
  flex: 1;
  border: 1px solid #e8d5c4;
  background: #fff;
  color: #8a5a32;
  border-radius: 999px;
  padding: 0.3rem 0.5rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}
.unlock-tab.is-on { background: #c45c26; border-color: #c45c26; color: #fff; }
.unlock-bg-preview {
  height: 6.2rem;
  border-radius: 12px;
  border: 1px solid #eadfd3;
  background: #f6ead8 center/cover no-repeat;
  display: grid;
  place-items: center;
  margin-bottom: 0.7rem;
  color: #8a6a4a;
  font-size: 0.75rem;
  font-weight: 800;
  overflow: hidden;
}
.unlock-presets { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.55rem; }
.unlock-preset {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e2c4a8;
  cursor: pointer;
}
.unlock-preset.is-on { box-shadow: 0 0 0 2px #c45c26; }
.unlock-color-row { display: flex; align-items: center; gap: 0.5rem; }
.unlock-file-pill { display: inline-flex; }
.unlock-style-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  border: 1px solid #eadfd3;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  margin: 0 0 0.4rem;
}
.unlock-style-opt.is-on { border-color: #c45c26; background: #fff8f1; box-shadow: 0 0 0 2px rgba(196,92,38,0.16); }
.unlock-style-name { font-size: 0.82rem; font-weight: 800; color: #4a3a2c; }
.unlock-style-desc { font-size: 0.7rem; color: #8a6a4a; }
.unlock-style-preview { margin-top: 0.2rem; }
.unlock-go, .activity-unlock-go {
  margin-left: 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: #c45c26;
}
.activity-unlock-item.is-action { cursor: pointer; }
.unlock-hl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.unlock-hl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.55rem;
  border: 1px solid #eadfd3;
  border-radius: 10px;
  background: #fff;
}
.unlock-hl-title { margin: 0; font-size: 0.82rem; font-weight: 800; color: #4a3a2c; }
.unlock-hl-meta { margin: 0.15rem 0 0; font-size: 0.7rem; color: #8a6a4a; }
#post-highlight-field.is-disabled { opacity: 0.55; }

.highlight-mark {
  position: absolute;
  z-index: 3;
  top: 0.45rem;
  left: 0.45rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.card.is-highlight-seal,
.card.feat-seal { box-shadow: 0 0 0 1px rgba(196, 69, 43, 0.28), 0 1px 3px rgba(0,0,0,0.04); }
.card.is-highlight-seal .highlight-mark,
.feat-seal .highlight-mark {
  padding: 0.12rem 0.32rem;
  background: #c4452b;
  color: #fff6e8;
  border: 1px solid #f0c9b4;
  transform: rotate(-8deg);
  font-size: 0.66rem;
}
.card.is-highlight-glow,
.card.feat-lantern {
  box-shadow: 0 0 0 2px rgba(232, 176, 58, 0.5), 0 8px 18px rgba(196, 92, 38, 0.14);
}
.card.is-highlight-glow .highlight-mark,
.feat-lantern .highlight-mark {
  padding: 0.16rem 0.42rem 0.2rem;
  border-radius: 40% 40% 46% 46%;
  background: radial-gradient(circle at 50% 20%, #fff4d2, #e8b03a 58%, #c45c26);
  color: #4a2a10;
  font-size: 0.64rem;
}
.card.is-highlight-ribbon,
.card.feat-ribbon { outline: 1px solid rgba(212, 162, 74, 0.45); outline-offset: -1px; }
.card.is-highlight-ribbon .highlight-mark,
.feat-ribbon .highlight-mark {
  padding: 0.12rem 0.55rem;
  background: linear-gradient(180deg, #f3d27a, #d4a24a);
  color: #4a320e;
  clip-path: polygon(0 0, 100% 0, 88% 50%, 100% 100%, 0 100%, 12% 50%);
  font-size: 0.66rem;
}
.card.is-highlight-ink {
  box-shadow: inset 0 0 0 1px rgba(26,26,26,0.35);
}
.card.is-highlight-ink .highlight-mark,
.feat-ink .highlight-mark {
  padding: 0.08rem 0.42rem 0.12rem;
  background: transparent;
  color: #1a1a1a;
  border-bottom: 2px solid #1a1a1a;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
}

body.post-is-featured #post-stage.is-highlight-seal { box-shadow: inset 0 0 0 3px rgba(196, 69, 43, 0.28); }
#post-stage.is-highlight-glow,
#post-stage.is-highlight-lantern,
#post-stage.feat-lantern { box-shadow: 0 0 0 3px rgba(232, 176, 58, 0.4), 0 10px 28px rgba(196, 92, 38, 0.16); }
#post-stage.is-highlight-ribbon #post-caption { background-image: linear-gradient(90deg, rgba(243, 210, 122, 0.28), transparent 42%); }
#post-stage.is-highlight-ink #post-title { border-bottom: 2px solid #1a1a1a; padding-bottom: 0.2rem; }

/* Do not set #post-caption { position: relative } — the ID wins over
   .post-caption { position: absolute; bottom: ... } and puts title/body
   in normal flow under the header, above the letterboxed photo. */
#post-caption > .highlight-mark { position: static; display: inline-block; margin: 0 0.4rem 0 0; vertical-align: middle; }


/* 排行榜展示框 4 式（5000 点解锁后自选，可关闭） */
.activity-rank-row.is-frame-gold,
.activity-rank-row.has-rank-frame.is-frame-gold {
  border: 2px solid #d4a24a;
  background:
    linear-gradient(#fffdf8, #fff8f1) padding-box,
    linear-gradient(135deg, #f3d27a, #c45c26 42%, #d4a24a) border-box;
  box-shadow: 0 0 0 1px rgba(196, 92, 38, 0.12), 0 4px 12px rgba(180, 110, 30, 0.12);
}
.activity-rank-row.is-frame-cinnabar {
  position: relative;
  border: 2px solid #b42a1c;
  background: linear-gradient(180deg, #fff4ee, #fff);
  box-shadow: 0 4px 14px rgba(180, 42, 28, 0.12);
}
.activity-rank-row.is-frame-cinnabar::before,
.activity-rank-row.is-frame-cinnabar::after {
  content: "";
  position: absolute;
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid #b42a1c;
  pointer-events: none;
  box-sizing: border-box;
}
.activity-rank-row.is-frame-cinnabar::before {
  top: -2px; left: -2px;
  border-right: 0; border-bottom: 0;
}
.activity-rank-row.is-frame-cinnabar::after {
  bottom: -2px; right: -2px;
  border-left: 0; border-top: 0;
}
.activity-rank-row.is-frame-jade {
  border: 2px solid #6a9a86;
  background: linear-gradient(180deg, #eef7f2, #fff);
  box-shadow: 0 0 0 3px rgba(106, 154, 134, 0.18), 0 4px 14px rgba(47, 107, 82, 0.1);
}
.activity-rank-row.is-frame-ink {
  border: 2px solid #2c241c;
  background:
    linear-gradient(180deg, rgba(255,248,241,0.92), #fff),
    radial-gradient(circle at 0 0, rgba(44,36,28,0.12), transparent 46%);
  box-shadow: inset 0 0 0 1px rgba(44, 36, 28, 0.2), 0 4px 14px rgba(44, 36, 28, 0.12);
}

/* 关注 / 粉丝：粉丝数放在活跃度排行榜后面，以及他人主页的关注按钮 */
.mine-activity .user-fans {
  flex: 0 0 auto;
}
.user-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}
.user-hero-top .mine-nick { flex: 1; min-width: 0; }
.user-fans {
  display: inline-flex;
  align-items: baseline;
  gap: 0.18rem;
  margin: 0;
  padding: 0.06rem 0.42rem;
  border-radius: 999px;
  border: 1px solid #e8d5c4;
  background: #fffaf5;
  color: #8a6a4a;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.35;
  white-space: nowrap;
  font-style: normal;
}
.user-fans[hidden] { display: none !important; }
.user-fans-num {
  font-size: 0.78rem;
  font-weight: 900;
  color: #c45c26;
  font-style: normal;
  letter-spacing: 0.01em;
  line-height: 1;
}
.user-follow-btn {
  flex: 0 0 auto;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0.05rem 0 0;
  padding: 0.18rem 0.72rem;
  min-width: 3.6rem;
  min-height: 1.7rem;
  border-radius: 999px;
  border: 1px solid #c45c26;
  background: #c45c26;
  color: #fffaf5;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.user-follow-btn:active { background: #a84b1d; }
.user-follow-btn.is-following {
  background: #fffaf5;
  color: #8a5a32;
  border-color: #e8d5c4;
}
.user-follow-btn.is-following:active { background: #f3ebe3; }
.user-follow-btn[hidden] { display: none !important; }
.user-follow-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

a.user-fans {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
a.user-fans:active { background: #f3ebe3; }

/* 粉丝列表 */
.fans-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.fans-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #eadfd3;
  box-shadow: 0 1px 3px rgba(80, 48, 20, 0.04);
}
.fans-row.is-me {
  border-color: #e2c4a8;
  background: linear-gradient(180deg, #fff8f1, #fff);
}
.fans-row-main {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.fans-row-main:active { opacity: 0.85; }
.fans-row-avatar { flex: 0 0 auto; }
.fans-row-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.fans-row-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #4a3a2c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fans-row-sub {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #8a6a4a;
  line-height: 1.35;
}
.fans-row-action {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.fans-mutual {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.52rem;
  border-radius: 999px;
  border: 1px solid #e2c4a8;
  background: #fff8f1;
  color: #c45c26;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
  white-space: nowrap;
}
.fans-follow-btn { margin: 0; }
.fans-empty { list-style: none; margin: 0; padding: 0; }

/* ===== Video tab + compose + Douyin-style detail (shareType=video) ===== */
/* Caption isolation: do not set #post-caption { position: relative }.
   Video caption overlay is scoped under html.is-video / body.post-page.is-video. */

.video-tab-head {
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.55rem 0.45rem;
}
.video-tab-head .mine-publish-btn { margin-left: auto; }
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.15rem 0.35rem calc(0.8rem + var(--tabbar-h) + var(--safe-bottom));
}
.video-tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
  text-align: left;
}
.video-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: none;
}
.video-tile-transcoding {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 2;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.58);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
}
.video-tile-play {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 0.7rem;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.card-stats {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 1.5rem 0.52rem 0.46rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.62));
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}
.card-stats-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.card-stats-item {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
}
.card-stats-item svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  display: block;
}
.card-stats-duration {
  flex: none;
  font-variant-numeric: tabular-nums;
}
.video-tile-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.6rem 0.45rem 0.42rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.62));
}
.video-tile-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-tile-author {
  margin: 0.15rem 0 0;
  font-size: 0.66rem;
  opacity: 0.88;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-empty {
  grid-column: 1 / -1;
  margin: 1.2rem 0.4rem;
  padding: 2rem 1.1rem;
  text-align: center;
  background: #fff;
  border-radius: 12px;
}
.video-empty h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 900;
}
.video-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.video-empty .primary { margin-top: 1rem; }

#view-upload.is-video-compose #post-image-label,
#view-upload.is-video-compose #post-image-hint,
#view-upload.is-video-compose .audio-compose { display: none; }
#view-upload.is-custom-compose #post-body-label,
#view-upload.is-custom-compose #post-image-label,
#view-upload.is-custom-compose #post-image-hint,
#view-upload.is-custom-compose #image-preview,
#view-upload.is-custom-compose > .upload-layout .audio-compose,
#view-upload.is-custom-compose form > .audio-compose,
#view-upload.is-custom-compose form > #post-video-compose-widgets { display: none; }
#view-upload.is-custom-compose #post-custom-composer:not([hidden]) { display: grid; }
.custom-compose[hidden] { display: none !important; }
#view-upload.is-custom-compose .custom-block .audio-compose,
#view-upload.is-custom-compose .custom-block #post-video-compose-widgets { display: grid; }
#view-upload.is-custom-compose .custom-block #post-video-label,
#view-upload.is-custom-compose .custom-block #post-video-hint { display: block; }
#view-upload.is-custom-compose .custom-block #post-video-cover-field:not([hidden]) { display: grid; }
#view-upload.is-video-compose #post-video-label,
#view-upload.is-video-compose #post-video-hint { display: block; }
/* Visible cover uses .cat-field grid; do not use display:block here,
   which would also un-hide a [hidden] field. */
#view-upload.is-video-compose #post-video-cover-field:not([hidden]) { display: grid; }

.video-compose-preview {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
}
.video-compose-preview img,
.video-compose-preview video {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  background: #111;
  flex: 0 0 auto;
}
.video-compose-preview .video-compose-name {
  margin: 0;
  font-weight: 800;
  font-size: 0.88rem;
}
.video-compose-preview .video-compose-size {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}
.video-cover-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.video-cover-preview {
  width: 96px;
  height: 128px;
  border-radius: 8px;
  background: #f3f3f3;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.4rem;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}
.video-cover-preview.has-cover {
  padding: 0;
  background: #111;
  color: #fff;
}
.video-cover-preview img,
.video-cover-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: none;
  background: #111;
}
.video-cover-tag {
  position: absolute;
  left: 0.3rem;
  bottom: 0.3rem;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
  pointer-events: none;
}
.video-cover-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
}
.video-cover-upload {
  margin: 0;
  cursor: pointer;
}
.video-cover-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.video-frame-picker {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.65rem;
  width: 100%;
}
.video-frame-picker[hidden] { display: none !important; }
.video-frame-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(240px, 42vh);
  height: auto;
  background: #111;
  border-radius: 10px;
  object-fit: contain;
  display: block;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
.video-frame-seek {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.video-frame-seek input[type="range"] {
  flex: 1;
  min-width: 0;
  margin: 0;
  accent-color: var(--orange);
}
.video-frame-time {
  flex: 0 0 auto;
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 5.8em;
  text-align: right;
}
.video-frame-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.video-frame-actions .primary,
.video-frame-actions .ghost {
  margin: 0;
}
.video-compose-progress { margin: 0.35rem 0 0; }
.video-compose-bar {
  height: 4px;
  border-radius: 99px;
  background: #eee;
  overflow: hidden;
}
.video-compose-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--orange);
  border-radius: 99px;
  transition: width 0.16s linear;
}

html.is-video body.post-page,
body.post-page.is-video {
  background: #000;
  color: #fff;
}
html.is-video .post-stage,
body.post-page.is-video .post-stage {
  background: #000;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  display: block;
}
@media (min-width: 900px) {
  html.is-video,
  html.is-video body.post-page,
  body.post-page.is-video {
    background: #111;
  }
  html.is-video .post-stage,
  body.post-page.is-video .post-stage {
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 12px 40px rgba(0,0,0,0.35);
  }
}
html.is-video .post-album,
body.post-page.is-video .post-album { display: none !important; }
html.is-video .video-reel,
body.post-page.is-video .video-reel {
  display: block;
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
}
html.is-video .video-slide,
body.post-page.is-video .video-slide {
  position: absolute;
  inset: 0;
}
html.is-video .video-player,
body.post-page.is-video .video-player {
  display: block;
  width: 100%;
  height: 100%;
  /* Always preserve aspect ratio. Landscape gets top/bottom bars;
     tall/portrait fills the dark stage as much as possible with side bars.
     Never crop (cover) or stretch. */
  object-fit: contain;
  object-position: center;
  background: #000;
  max-width: none;
  max-height: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
html.is-video .video-reel,
body.post-page.is-video .video-reel,
html.is-video .video-slide,
body.post-page.is-video .video-slide {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
html.is-video .video-player.is-letterbox,
body.post-page.is-video .video-player.is-letterbox {
  object-fit: contain;
}
html.is-video .video-progress,
body.post-page.is-video .video-progress {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  z-index: 22;
  background: rgba(255,255,255,0.22);
  pointer-events: none;
}
html.is-video .video-progress i,
body.post-page.is-video .video-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
}
html.is-video .video-transcode-hint,
body.post-page.is-video .video-transcode-hint {
  position: absolute;
  top: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  margin: 0;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  pointer-events: none;
}
html.is-video .video-transcode-hint[hidden],
body.post-page.is-video .video-transcode-hint[hidden] { display: none !important; }
html.is-video .video-mute-hint,
body.post-page.is-video .video-mute-hint {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  z-index: 24;
  border: 0;
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
html.is-video .video-pause-ico,
body.post-page.is-video .video-pause-ico {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 23;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent rgba(255,255,255,0.88);
  transform: translate(-40%, -50%);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  pointer-events: none;
}
html.is-video .post-caption,
body.post-page.is-video .post-caption,
html.is-video #post-caption,
body.post-page.is-video #post-caption {
  position: absolute;
  left: 0.85rem;
  right: 4.5rem;
  bottom: calc(1.1rem + var(--safe-bottom));
  z-index: 16;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.55);
}
html.is-video .post-title,
body.post-page.is-video .post-title { color: #fff; }
html.is-video .post-body,
body.post-page.is-video .post-body { color: rgba(255,255,255,0.92); }
html.is-video .post-music,
body.post-page.is-video .post-music { display: none !important; }

html.is-video .post-author-chip,
body.post-page.is-video .post-author-chip { display: none !important; }
html.is-video .post-chrome,
body.post-page.is-video .post-chrome {
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 100%);
}
html.is-video .post-caption-author,
body.post-page.is-video .post-caption-author {
  margin: 0 0 0.28rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  pointer-events: auto;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.is-video .post-caption-author[hidden],
body.post-page.is-video .post-caption-author[hidden] { display: none !important; }
html.is-video .post-loc-chip,
body.post-page.is-video .post-loc-chip {
  display: inline-flex;
  align-items: center;
  margin-top: 0.4rem;
  max-width: 100%;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.is-video .post-loc-chip[hidden],
body.post-page.is-video .post-loc-chip[hidden] { display: none !important; }
/* Keep overflow visible on the outer rail button so the follow + can hang
   off the edge; the inner .rail-av-clip provides the same circular clip as
   other pages. Do not change object-fit on the avatar photo. */
html.is-video .rail-av,
body.post-page.is-video .rail-av {
  position: relative;
  overflow: visible;
}
html.is-video .rail-av-clip,
body.post-page.is-video .rail-av-clip {
  overflow: hidden;
  border-radius: 50%;
}
html.is-video .rail-av img,
body.post-page.is-video .rail-av img {
  object-fit: cover;
}
html.is-video .rail-follow,
body.post-page.is-video .rail-follow {
  position: absolute;
  left: 50%;
  bottom: -0.45rem;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fe2c55;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.25);
}
html.is-video .rail-follow.is-following,
body.post-page.is-video .rail-follow.is-following {
  background: #fff;
  color: #fe2c55;
  font-size: 11px;
  line-height: 18px;
}
html.is-video .rail-follow[hidden],
body.post-page.is-video .rail-follow[hidden] { display: none !important; }
html.is-video .video-corner,
body.post-page.is-video .video-corner {
  position: absolute;
  right: 0.65rem;
  bottom: calc(0.55rem + var(--safe-bottom));
  z-index: 26;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
html.is-video .video-corner[hidden],
body.post-page.is-video .video-corner[hidden] { display: none !important; }
html.is-video .video-fs-btn,
body.post-page.is-video .video-fs-btn {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  height: 34px;
  padding: 0 0.62rem 0 0.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex: 0 0 auto;
}
html.is-video .video-fs-btn[hidden],
body.post-page.is-video .video-fs-btn[hidden] { display: none !important; }
html.is-video .video-fs-ico,
body.post-page.is-video .video-fs-ico {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  display: block;
  background:
    linear-gradient(#fff,#fff) 0 0 / 5px 2px no-repeat,
    linear-gradient(#fff,#fff) 0 0 / 2px 5px no-repeat,
    linear-gradient(#fff,#fff) 100% 0 / 5px 2px no-repeat,
    linear-gradient(#fff,#fff) 100% 0 / 2px 5px no-repeat,
    linear-gradient(#fff,#fff) 0 100% / 5px 2px no-repeat,
    linear-gradient(#fff,#fff) 0 100% / 2px 5px no-repeat,
    linear-gradient(#fff,#fff) 100% 100% / 5px 2px no-repeat,
    linear-gradient(#fff,#fff) 100% 100% / 2px 5px no-repeat;
}
html.is-video .video-fs-btn.is-on .video-fs-ico,
body.post-page.is-video .video-fs-btn.is-on .video-fs-ico {
  background:
    linear-gradient(#fff,#fff) 2px 0 / 2px 5px no-repeat,
    linear-gradient(#fff,#fff) 0 3px / 5px 2px no-repeat,
    linear-gradient(#fff,#fff) calc(100% - 2px) 0 / 2px 5px no-repeat,
    linear-gradient(#fff,#fff) 100% 3px / 5px 2px no-repeat,
    linear-gradient(#fff,#fff) 2px 100% / 2px 5px no-repeat,
    linear-gradient(#fff,#fff) 0 calc(100% - 3px) / 5px 2px no-repeat,
    linear-gradient(#fff,#fff) calc(100% - 2px) 100% / 2px 5px no-repeat,
    linear-gradient(#fff,#fff) 100% calc(100% - 3px) / 5px 2px no-repeat;
}

html.is-video .video-volume,
body.post-page.is-video .video-volume {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 34px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  z-index: 26;
  flex: 0 0 auto;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}
html.is-video .video-volume[hidden],
body.post-page.is-video .video-volume[hidden] { display: none !important; }
html.is-video .video-volume-btn,
body.post-page.is-video .video-volume-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
  -webkit-tap-highlight-color: transparent;
}
html.is-video .video-volume-btn svg,
body.post-page.is-video .video-volume-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}
html.is-video .video-volume:not(.is-muted) .video-volume-ico-off,
body.post-page.is-video .video-volume:not(.is-muted) .video-volume-ico-off { display: none; }
html.is-video .video-volume.is-muted .video-volume-ico-on,
body.post-page.is-video .video-volume.is-muted .video-volume-ico-on { display: none; }
html.is-video .video-volume-slider,
body.post-page.is-video .video-volume-slider {
  width: 0;
  height: 34px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  margin-right: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
  flex: 0 0 auto;
}
html.is-video .video-volume:hover .video-volume-slider,
html.is-video .video-volume:focus-within .video-volume-slider,
html.is-video .video-volume.is-open .video-volume-slider,
body.post-page.is-video .video-volume:hover .video-volume-slider,
body.post-page.is-video .video-volume:focus-within .video-volume-slider,
body.post-page.is-video .video-volume.is-open .video-volume-slider {
  width: 92px;
  opacity: 1;
  margin-right: 0.55rem;
}
html.is-video .video-volume-track,
body.post-page.is-video .video-volume-track {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  bottom: auto;
  width: auto;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
}
html.is-video .video-volume-fill,
body.post-page.is-video .video-volume-fill {
  position: absolute;
  left: 4px;
  top: 50%;
  bottom: auto;
  width: 0;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #fff;
  pointer-events: none;
}
html.is-video .video-volume-knob,
body.post-page.is-video .video-volume-knob {
  position: absolute;
  top: 50%;
  left: 4px;
  bottom: auto;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  margin-bottom: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  pointer-events: none;
}
@media (hover: none) and (pointer: coarse) {
  html.is-video .video-volume,
  body.post-page.is-video .video-volume { display: none !important; }
}
@media (max-width: 719px) {
  html.is-video .video-volume,
  body.post-page.is-video .video-volume { display: none !important; }
}
@media (hover: hover) and (pointer: fine) and (min-width: 720px) {
  html.is-video .post-caption,
  body.post-page.is-video .post-caption,
  html.is-video #post-caption,
  body.post-page.is-video #post-caption {
    right: 12rem;
  }
}



/* Real browser fullscreen: stage fills the monitor; video still contain-scaled. */
html.is-video .post-stage:fullscreen,
html.is-video .post-stage:-webkit-full-screen,
body.post-page.is-video .post-stage:fullscreen,
body.post-page.is-video .post-stage:-webkit-full-screen,
html.is-video .post-stage.is-video-fs,
body.post-page.is-video .post-stage.is-video-fs {
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  margin: 0;
  background: #000;
  box-shadow: none;
  inset: 0;
}
html.is-video .post-stage:fullscreen .video-player,
html.is-video .post-stage:-webkit-full-screen .video-player,
body.post-page.is-video .post-stage:fullscreen .video-player,
body.post-page.is-video .post-stage:-webkit-full-screen .video-player,
html.is-video .post-stage.is-video-fs .video-player,
body.post-page.is-video .post-stage.is-video-fs .video-player {
  object-fit: contain;
  object-position: center;
}
html.is-video .post-stage::backdrop,
html.is-video .post-stage:-webkit-full-screen-backdrop,
body.post-page.is-video .post-stage::backdrop {
  background: #000;
}

/* CSS fallback fullscreen (e.g. iOS, no element Fullscreen API). */
html.is-video-fs,
html.is-video-fs body.post-page,
body.post-page.is-video.is-video-fs {
  background: #000;
  overflow: hidden;
  height: 100%;
  height: 100dvh;
}
html.is-video-fs .post-stage,
body.post-page.is-video.is-video-fs .post-stage,
html.is-video .post-stage.is-video-fs,
body.post-page.is-video .post-stage.is-video-fs {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  margin: 0;
  z-index: 70;
  background: #000;
  box-shadow: none;
}

/* Immersive watch mode: hide page chrome so mobile CSS/native fullscreen is obvious. */
html.is-video-fs .post-chrome,
html.is-video-fs .post-rail,
html.is-video-fs .post-caption,
html.is-video .post-stage:fullscreen .post-chrome,
html.is-video .post-stage:-webkit-full-screen .post-chrome,
html.is-video .post-stage:fullscreen .post-rail,
html.is-video .post-stage:-webkit-full-screen .post-rail,
html.is-video .post-stage:fullscreen .post-caption,
html.is-video .post-stage:-webkit-full-screen .post-caption,
body.post-page.is-video.is-video-fs .post-chrome,
body.post-page.is-video.is-video-fs .post-rail,
body.post-page.is-video.is-video-fs .post-caption,
body.post-page.is-video .post-stage:fullscreen .post-chrome,
body.post-page.is-video .post-stage:-webkit-full-screen .post-chrome,
body.post-page.is-video .post-stage:fullscreen .post-rail,
body.post-page.is-video .post-stage:-webkit-full-screen .post-rail,
body.post-page.is-video .post-stage:fullscreen .post-caption,
body.post-page.is-video .post-stage:-webkit-full-screen .post-caption,
html.is-video .post-stage.is-video-fs .post-chrome,
html.is-video .post-stage.is-video-fs .post-rail,
html.is-video .post-stage.is-video-fs .post-caption,
body.post-page.is-video .post-stage.is-video-fs .post-chrome,
body.post-page.is-video .post-stage.is-video-fs .post-rail,
body.post-page.is-video .post-stage.is-video-fs .post-caption {
  display: none !important;
}


/* Comments open: keep a compact contain-fit video at the TOP of the
   visible area (visualViewport), with the sheet + composer in the space
   below. 38dvh is the no-keyboard size; once the keyboard is up that
   reserve is taller than the visible viewport, so the video would sit
   off-screen and only the white sheet would remain. Do not cover the
   video with a dark scrim. --video-cmt-top / --cmt-vv-* are set from JS;
   CSS fallbacks use --vv-height / --vv-offset from app.js. */
html.is-video.cmt-open,
html.is-video body.cmt-open,
body.post-page.is-video.cmt-open {
  overflow: hidden;
  overscroll-behavior: none;
  --cmt-vv-top: var(--vv-offset, 0px);
  --video-cmt-top: min(
    38dvh,
    calc(var(--vv-height, 100dvh) * 0.38),
    max(120px, calc(var(--vv-height, 100dvh) - 210px))
  );
}
html.is-video body.cmt-open .video-reel,
body.post-page.is-video.cmt-open .video-reel {
  position: fixed;
  top: var(--cmt-vv-top, var(--vv-offset, 0px));
  left: 0;
  right: 0;
  bottom: auto;
  width: 100%;
  height: var(--video-cmt-top, 38dvh);
  z-index: 85;
  background: #000;
}
html.is-video body.cmt-open .video-progress,
body.post-page.is-video.cmt-open .video-progress {
  position: fixed;
  top: calc(var(--cmt-vv-top, var(--vv-offset, 0px)) + var(--video-cmt-top, 38dvh) - 3px);
  left: 0;
  right: 0;
  bottom: auto;
  z-index: 86;
}
html.is-video body.cmt-open .video-mute-hint,
html.is-video body.cmt-open .video-pause-ico,
body.post-page.is-video.cmt-open .video-mute-hint,
body.post-page.is-video.cmt-open .video-pause-ico {
  position: fixed;
  top: calc(var(--cmt-vv-top, var(--vv-offset, 0px)) + var(--video-cmt-top, 38dvh) / 2);
}
html.is-video body.cmt-open .video-fs-btn,
body.post-page.is-video.cmt-open .video-fs-btn {
  position: fixed;
  top: calc(var(--cmt-vv-top, var(--vv-offset, 0px)) + var(--video-cmt-top, 38dvh) - 42px);
  bottom: auto;
  z-index: 86;
}
html.is-video body.cmt-open .post-rail,
html.is-video body.cmt-open .post-caption,
html.is-video body.cmt-open #post-caption,
body.post-page.is-video.cmt-open .post-rail,
body.post-page.is-video.cmt-open .post-caption,
body.post-page.is-video.cmt-open #post-caption {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
html.is-video body.cmt-open .cmt-scrim,
body.post-page.is-video.cmt-open .cmt-scrim {
  background: transparent;
  top: var(--cmt-vv-top, var(--vv-offset, 0px));
  bottom: auto;
  height: var(--video-cmt-top, 38dvh);
  z-index: 87;
}
html.is-video body.cmt-open .cmt-sheet,
body.post-page.is-video.cmt-open .cmt-sheet {
  top: calc(var(--cmt-vv-top, var(--vv-offset, 0px)) + var(--video-cmt-top, 38dvh));
  /* Dock to the visual-viewport bottom, lifted only by --cmt-kb (a real
     keyboard overlap, or a layout-fixed lift out of the leftover band).
     --cmt-extend is painted by ::after below the sheet; --cmt-accessory
     keeps the composer flush above the native bar. When the keyboard is
     open, --video-cmt-top grows so the list stays short and leftover
     height returns to the video. */
  bottom: var(--cmt-kb, 0px);
  height: auto;
  max-height: none;
  border-radius: 14px 14px 0 0;
}

/* PC overflow fix: cmt-open promotes .video-reel / progress / sheet / scrim
   to position:fixed with left:0; right:0; width:100%, which is correct on a
   full-bleed phone but stretches them to the browser viewport and past the
   centered .post-stage (max-width: var(--shell-max, 960px)) on desktop.
   Clamp to the same shell width and center. Below shell-max this remains
   full-bleed, so WeChat/iOS reply + keyboard layout is unchanged. */
html.is-video body.cmt-open .video-reel,
body.post-page.is-video.cmt-open .video-reel,
html.is-video body.cmt-open .video-progress,
body.post-page.is-video.cmt-open .video-progress,
html.is-video body.cmt-open .cmt-scrim,
body.post-page.is-video.cmt-open .cmt-scrim,
html.is-video body.cmt-open .cmt-sheet,
body.post-page.is-video.cmt-open .cmt-sheet {
  left: 0;
  right: 0;
  width: 100%;
  max-width: var(--shell-max, 960px);
  margin-left: auto;
  margin-right: auto;
}
html.is-video body.cmt-open .video-fs-btn,
body.post-page.is-video.cmt-open .video-fs-btn {
  /* Keep 0.65rem inset from the shell edge, not the browser edge. */
  right: max(0.65rem, calc((100vw - var(--shell-max, 960px)) / 2 + 0.65rem));
}

@media (min-width: 760px) {
  .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


/* 花汐阁 feed / tab loading bloom */
.feed-grid > .feed-loading,
.video-grid > .feed-loading,
.video-empty > .feed-loading {
  grid-column: 1 / -1;
}
.feed-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 2.4rem 1rem 2rem;
  color: var(--muted);
  text-align: center;
}
.feed-loading.is-more {
  padding: 0.9rem 0.6rem 1.15rem;
}
.feed-bloom {
  width: 52px;
  height: 52px;
  position: relative;
  flex: 0 0 auto;
  animation: feed-bloom-spin 11s linear infinite;
}
.feed-loading.is-more .feed-bloom {
  width: 36px;
  height: 36px;
}
.feed-bloom .petal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 24px;
  margin: -22px 0 0 -7px;
  transform-origin: 50% 100%;
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle at 50% 62%, #ff9aa6 0%, var(--red, #ff2442) 74%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  animation: feed-petal-breathe 1.5s ease-in-out infinite;
}
.feed-loading.is-more .feed-bloom .petal {
  width: 10px;
  height: 16px;
  margin: -15px 0 0 -5px;
}
.feed-bloom .petal:nth-child(1) { animation-delay: 0s; }
.feed-bloom .petal:nth-child(2) { animation-delay: 0.12s; }
.feed-bloom .petal:nth-child(3) { animation-delay: 0.24s; }
.feed-bloom .petal:nth-child(4) { animation-delay: 0.36s; }
.feed-bloom .petal:nth-child(5) { animation-delay: 0.48s; }
.feed-bloom .pistil {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 11px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3c8, var(--gold, #e8b03a) 58%, #c99220);
  box-shadow: 0 0 0 3px rgba(232, 176, 58, 0.22);
  z-index: 2;
}
.feed-loading.is-more .feed-bloom .pistil {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  box-shadow: 0 0 0 2px rgba(232, 176, 58, 0.2);
}
.feed-loading-text {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
@keyframes feed-bloom-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes feed-petal-breathe {
  0%, 100% { transform: rotate(var(--r, 0deg)) scale(0.86); opacity: 0.72; }
  50% { transform: rotate(var(--r, 0deg)) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .feed-bloom,
  .feed-bloom .petal {
    animation: none;
  }
  .feed-bloom .petal {
    transform: rotate(var(--r, 0deg));
    opacity: 1;
  }
}

.mine-admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}
.mine-admin-btn[hidden] { display: none !important; }


/* ===== 自定义分享：发帖模块编排 ===== */
.custom-compose { display: none; gap: 0.7rem; }
.custom-compose-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.custom-add-btn {
  margin: 0;
  padding: 0.38rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
}
.custom-blocks { display: grid; gap: 0.65rem; }
.custom-block {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fafafa;
  padding: 0.7rem 0.75rem 0.8rem;
  display: grid;
  gap: 0.5rem;
}
.custom-block-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.custom-block-type {
  font-size: 0.82rem;
  font-weight: 800;
  color: #333;
}
.custom-block-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.custom-block-ops .ghost {
  margin: 0;
  padding: 0.22rem 0.55rem;
  font-size: 0.75rem;
}
.custom-block-ops .ghost:disabled {
  opacity: 0.4;
  cursor: default;
}
.custom-block textarea {
  min-height: 6.5rem;
  resize: vertical;
}
.custom-image-preview {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  display: block;
}
.custom-image-pick {
  position: relative;
  display: inline-block;
  margin: 0;
  cursor: pointer;
  width: auto;
}
.custom-image-pick input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.custom-image-empty,
.custom-blocks-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.custom-block .preview-box { min-height: 96px; }

/* ===== 自定义分享详情：沿用图文白底排版，按模块顺序展示；不留空封面行 ===== */
html.is-custom .post-stage,
html.is-custom .post-stage.is-article,
html.is-custom .post-stage.is-custom,
html.is-custom.post-page .post-stage,
:is(html.is-custom, body.post-page.is-custom) .post-stage,
:is(html.is-custom, body.post-page.is-custom) .post-stage.is-article,
:is(html.is-custom, body.post-page.is-custom) .post-stage.is-custom,
#post-stage.is-custom {
  align-content: start !important;
  grid-template-areas:
    "chrome"
    "title"
    "body"
    "lottery" !important;
}
html.is-custom #post-media,
html.is-custom .post-media,
html.is-custom .post-album,
html.is-custom .video-reel,
:is(html.is-custom, body.post-page.is-custom) .post-media,
:is(html.is-custom, body.post-page.is-custom) .post-album,
:is(html.is-custom, body.post-page.is-custom) .video-reel,
:is(html.is-custom, body.post-page.is-custom) #video-progress,
:is(html.is-custom, body.post-page.is-custom) #video-fs-btn,
:is(html.is-custom, body.post-page.is-custom) #video-mute-hint,
:is(html.is-custom, body.post-page.is-custom) #video-pause-ico {
  display: none !important;
  min-height: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}
:is(html.is-custom, body.post-page.is-custom) .post-body { display: none !important; }
:is(html.is-custom, body.post-page.is-custom) .post-title {
  margin: 0.7rem 1.1rem 0.15rem;
}
:is(html.is-custom, body.post-page.is-custom) .post-title[hidden] { display: none !important; }
:is(html.is-custom, body.post-page.is-custom) .post-custom {
  grid-area: body;
  display: grid;
  gap: 0.85rem;
  margin: 0.55rem 1.1rem calc(2rem + var(--safe-bottom));
  min-width: 0;
}
:is(html.is-custom, body.post-page.is-custom) .post-custom[hidden] { display: none !important; }
:is(html.is-custom, body.post-page.is-custom) .post-title[hidden] + .post-custom {
  margin-top: 0.7rem;
}
.post-custom-h {
  margin: 0.15rem 0 0;
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.4;
  color: #111;
}
.post-custom-h:first-child { margin-top: 0; }
.post-custom-text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.75;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
}
.post-custom-image {
  display: block;
  width: 100%;
  height: auto;
  background: #f4f4f4;
}
.post-custom-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 70vh;
  background: #111;
  overflow: hidden;
}
.post-custom-video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #111;
}
#post-video-label.is-kept #post-video {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
#post-video-pick {
  display: none;
  margin: 0.35rem 0.5rem 0 0;
  cursor: pointer;
  vertical-align: middle;
}
#post-video-label.is-kept #post-video-pick:not([hidden]) {
  display: inline-flex;
  align-items: center;
}
.video-kept-status {
  display: inline-block;
  margin: 0.35rem 0 0;
  color: #2f6a3a;
  font-size: 0.88rem;
  line-height: 1.4;
  vertical-align: middle;
}
#post-video-kept[hidden],
#post-video-pick[hidden] { display: none; }
/* Auto cover is the <video poster>, not a covering <img> that hides controls. */
.post-custom-video-poster,
.post-custom-video-poster[hidden] { display: none !important; }
.post-custom-audio-slot { min-height: 2rem; }
:is(html.is-custom, body.post-page.is-custom) .post-music {
  position: static;
  margin: 0;
}
:is(html.is-custom, body.post-page.is-custom) .post-rail {
  grid-area: body;
  justify-self: end;
  align-self: end;
  position: relative;
  z-index: 8;
  margin: 0 calc(0.55rem + var(--safe-right)) 0.85rem 0;
}

/* 公共区 / 花汐阁 page-scope switch */
.scope-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.42rem 0.7rem 0.1rem;
  background: var(--bg);
}
.scope-switch {
  display: inline-flex;
  background: #f3ebe3;
  border-radius: 999px;
  padding: 2px;
  flex: 0 0 auto;
}
/* display:inline-flex beats the UA [hidden] rule, same issue as .cat-field */
.scope-switch[hidden] { display: none !important; }
.scope-tab {
  border: 0;
  background: transparent;
  color: #7a5a3a;
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.2;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.scope-tab.is-on {
  background: #fffaf5;
  color: #111;
  box-shadow: 0 1px 3px rgba(40, 24, 10, 0.1);
}
.scope-bar .feed-toolbar-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.02rem;
  margin-left: auto;
}
.scope-bar .feed-toolbar-actions .user-slot {
  max-width: 7rem;
  margin-left: 0.05rem;
}
@media (max-width: 380px) {
  .scope-tab { padding: 0.26rem 0.55rem; font-size: 0.76rem; }
}

/* 20261116t-local: hide video compose for 图片分享 and 图文分享 */
#view-upload:not(.is-video-compose):not(.is-custom-compose) #post-video-compose-widgets {
  display: none !important;
}
#post-video-compose-widgets[hidden] { display: none !important; }

/* 20261116v-local: guild join / create */
/* 20261116w-local: hide scope switch when [hidden]; display:inline-flex was overriding it */
/* 20261116y-local: logged-out (guest) hides all guild buttons */
.scope-cluster {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
}
.scope-cluster[data-guild-state="none"] .scope-switch,
.scope-cluster[data-guild-state="pending"] .scope-switch,
.scope-cluster[data-guild-state="guest"] .scope-switch { display: none !important; }
.scope-cluster[data-guild-state="member"] .scope-join-btn { display: none !important; }
.scope-cluster[data-guild-state="guest"] .scope-join-btn { display: none !important; }
.scope-join-btn[hidden] { display: none !important; }
.scope-join-btn {
  border: 0;
  background: #f3ebe3;
  color: #7a5a3a;
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.2;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  flex: 0 0 auto;
  white-space: nowrap;
}
.scope-join-btn.is-pending {
  color: #8a5a28;
  background: #f6e6d0;
}
.scope-join-btn:active { opacity: 0.86; }
@media (max-width: 380px) {
  .scope-join-btn { padding: 0.26rem 0.7rem; font-size: 0.76rem; }
}
#post-dest-field[data-no-guild="1"] .cat-pill[data-dest="guild"] { display: none !important; }

body.guild-sheet-open { overflow: hidden; }
.guild-sheet {
  position: absolute;
  inset: 0;
  z-index: 3200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  box-sizing: border-box;
}
.guild-sheet[hidden] { display: none !important; }
.guild-sheet.is-open { display: flex !important; }
.guild-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 28, 18, 0.45);
}
.guild-sheet-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(86%, 40rem);
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  background: #fffaf5;
  border-radius: 16px 16px 0 0;
  padding: 0.9rem 1rem calc(1rem + var(--safe-bottom, 0px));
  box-shadow: 0 -16px 40px rgba(40, 24, 10, 0.2);
}
.guild-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}
.guild-sheet-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  color: #4a3a2c;
}
.guild-sheet-sub {
  margin: 0.28rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #8a6a4a;
}
.guild-sheet-close {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: #f3ebe3;
  color: #4a3a2c;
  font-size: 1.2rem;
  cursor: pointer;
  flex: 0 0 auto;
}
.guild-sheet-notice {
  margin: 0 0 0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #f3ebe3;
  color: #6a4a32;
  font-size: 0.82rem;
  line-height: 1.45;
}
.guild-sheet-notice.is-ok { background: #e7f3ea; color: #2f6a3a; }
.guild-sheet-notice.is-err { background: #fbeceb; color: #a33c32; }
.guild-search-wrap { margin: 0 0 0.7rem; }
.guild-search-wrap input,
.guild-create-box input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e8ddd2;
  border-radius: 10px;
  background: #fff;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: #4a3a2c;
}
.guild-list,
.guild-pending-box,
.guild-mod-box { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.8rem; }
.guild-dir-row,
.guild-pending-card,
.guild-mod-card,
.mine-guild-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #f0e4d8;
}
.guild-pending-card,
.guild-mod-card,
.mine-guild-card {
  flex-direction: column;
  align-items: stretch;
}
.guild-dir-meta,
.guild-pending-card,
.guild-mod-card,
.mine-guild-card { min-width: 0; }
.guild-dir-meta strong,
.guild-pending-card strong,
.guild-mod-card strong,
.mine-guild-card strong {
  color: #4a3a2c;
  font-size: 0.92rem;
}
.guild-dir-count {
  margin-left: 0.35rem;
  color: #8a6a4a;
  font-size: 0.75rem;
  font-weight: 700;
}
.guild-dir-meta p,
.guild-pending-card p,
.guild-mod-card p,
.mine-guild-card p,
.guild-mod-note {
  margin: 0.28rem 0 0;
  color: #8a6a4a;
  font-size: 0.78rem;
  line-height: 1.45;
}
.guild-dir-status {
  flex: 0 0 auto;
  color: #8a5a28;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  padding-top: 0.15rem;
}
.guild-dir-row .primary,
.guild-pending-card .ghost,
.guild-pending-card .primary,
.mine-guild-card .primary,
.mine-guild-card .ghost {
  flex: 0 0 auto;
  min-height: 2rem;
  padding: 0.28rem 0.75rem;
  font-size: 0.8rem;
}
.guild-app-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid #f0e4d8;
}
.guild-app-meta { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.guild-app-meta b { color: #4a3a2c; font-size: 0.88rem; }
.guild-app-meta span { color: #8a6a4a; font-size: 0.74rem; }
.guild-app-actions { display: flex; gap: 0.35rem; flex: 0 0 auto; }
.guild-app-actions .primary,
.guild-app-actions .ghost {
  min-height: 2rem;
  padding: 0.22rem 0.65rem;
  font-size: 0.78rem;
}
.guild-create-box {
  padding: 0.8rem 0.75rem 0.2rem;
  border-top: 1px solid #f0e4d8;
}
.guild-create-box h4 {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  color: #4a3a2c;
}
.guild-create-box label {
  display: grid;
  gap: 0.28rem;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #6a4a32;
}
.guild-create-box .primary { width: 100%; min-height: 2.4rem; }
.mine-guild-panel {
  margin: 0.7rem 0 0;
}
.mine-guild-panel[hidden] { display: none !important; }
.mine-guild-card .guild-mod-card {
  margin-top: 0.55rem;
}

/* 20261117b-local: leave-guild button on the profile guild card */
.mine-guild-actions { margin-top: 0.55rem; }
.mine-leave-guild { color: #9a4a3a; border-color: #ead5cc; }


/* 20261117l-local: collapsible guild module on 我的 */
.mine-guild-panel {
  margin: 0.7rem 0 0;
}
.mine-guild-panel[hidden] { display: none !important; }
.mine-guild-module {
  border: 1px solid #f0e4d8;
  border-radius: 14px;
  background: #fffaf6;
  overflow: hidden;
}
.mine-guild-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.72rem 0.8rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: #4a3a2c;
  min-height: 2.6rem;
}
.mine-guild-toggle-name {
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #4a3a2c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mine-guild-toggle-badge {
  flex: 0 0 auto;
  min-width: 1.15rem;
  padding: 0.05rem 0.38rem;
  border-radius: 999px;
  background: #c45c26;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
}
.mine-guild-chevron {
  flex: 0 0 auto;
  width: 0.52rem;
  height: 0.52rem;
  margin: 0 0.1rem 0 0.15rem;
  border-right: 2px solid #b08968;
  border-bottom: 2px solid #b08968;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}
.mine-guild-module.is-open .mine-guild-chevron {
  transform: rotate(-135deg);
  margin-top: 0.25rem;
}
.mine-guild-body {
  display: none;
  padding: 0 0.8rem 0.85rem;
}
.mine-guild-module.is-open .mine-guild-body { display: block; }
.mine-guild-body > p {
  margin: 0 0 0.65rem;
  color: #8a6a4a;
  font-size: 0.78rem;
  line-height: 1.5;
}
.mine-guild-facts {
  display: grid;
  gap: 0.45rem;
}
.mine-guild-fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.52rem 0.65rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #f0e4d8;
}
.mine-guild-fact span {
  color: #8a6a4a;
  font-size: 0.75rem;
  font-weight: 700;
}
.mine-guild-fact b {
  color: #4a3a2c;
  font-size: 0.9rem;
  font-weight: 800;
}
.mine-guild-activity-num { color: #c45c26; font-weight: 900; }
.mine-guild-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}
.mine-guild-actions .primary,
.mine-guild-actions .ghost {
  flex: 1 1 auto;
  min-height: 2.15rem;
  padding: 0.28rem 0.75rem;
  font-size: 0.8rem;
}
.mine-leave-guild { color: #9a4a3a; border-color: #ead5cc; }
.mine-guild-module .guild-mod-card {
  margin-top: 0.7rem;
  background: #fff;
}
.mine-guild-confirm {
  position: fixed;
  inset: 0;
  z-index: 230;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}
.mine-guild-confirm[hidden] { display: none !important; }
.mine-guild-confirm.is-open { display: flex !important; }
.mine-guild-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 24, 12, 0.42);
}
.mine-guild-confirm-sheet {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  padding: 1.1rem 1.05rem 1rem;
  border-radius: 16px;
  background: #fffaf6;
  border: 1px solid #f0e4d8;
  box-shadow: 0 16px 40px rgba(80, 40, 16, 0.18);
}
.mine-guild-confirm-sheet h3 {
  margin: 0 0 0.45rem;
  text-align: center;
  font-size: 1.02rem;
  font-weight: 900;
  color: #4a3a2c;
}
.mine-guild-confirm-msg {
  margin: 0 0 1rem;
  text-align: center;
  color: #6a4a32;
  font-size: 0.86rem;
  line-height: 1.55;
}
.mine-guild-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.mine-guild-confirm-actions .primary,
.mine-guild-confirm-actions .ghost {
  min-height: 2.4rem;
  width: 100%;
  font-size: 0.88rem;
}
.mine-guild-confirm-ok { background: #c45c26; border-color: #c45c26; color: #fff; }
body.mine-guild-confirm-open { overflow: hidden; }

/* 我的 · 设置底板（资料编辑 / 退出登录 / 注销账号） */
.settings-scrim {
  position: fixed;
  inset: 0;
  z-index: 3300;
  background: rgba(40, 28, 18, 0.45);
}
.settings-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3301;
  width: 100%;
  max-width: 960px;
  max-height: min(86dvh, 40rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin: 0 auto;
  background: #fffaf5;
  color: #3b2a1c;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(40, 24, 10, 0.22);
  box-sizing: border-box;
  padding-bottom: var(--safe-bottom, 0px);
  animation: settings-sheet-up 0.26s ease-out;
}
@keyframes settings-sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.settings-scrim[hidden],
.settings-sheet[hidden],
.settings-body[hidden],
.settings-confirm[hidden] { display: none !important; }
.settings-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.55rem 3rem 0.35rem;
  border-bottom: 1px solid #f0e6da;
}
.settings-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 900;
  color: #3b2a1c;
}
.settings-close {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: #f3e9df;
  color: #4a3a2c;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.settings-close:active { background: #eadccd; }
.settings-body {
  padding: 0.35rem 1rem calc(0.9rem + var(--safe-bottom, 0px));
}
.settings-list {
  display: flex;
  flex-direction: column;
}
.settings-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.15rem;
  padding: 0.85rem 0.25rem;
  border: 0;
  border-bottom: 1px solid #f1e7dc;
  background: transparent;
  color: #3b2a1c;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.settings-item:last-child { border-bottom: 0; }
.settings-item:active { background: #fbf3ea; }
.settings-item-arrow {
  color: #b8a494;
  font-size: 1.15rem;
  line-height: 1;
}
.settings-item-danger { color: var(--danger, #b23a2e); }
.settings-item-danger .settings-item-arrow { color: #d9a59b; }
.settings-confirm {
  padding: 0.5rem 1.1rem calc(1rem + var(--safe-bottom, 0px));
}
.settings-confirm h3 {
  margin: 0.2rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 900;
  color: #3b2a1c;
}
.settings-confirm-text {
  margin: 0 0 0.45rem;
  color: #6a5546;
  font-size: 0.84rem;
  line-height: 1.6;
}
.settings-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.settings-confirm-actions .ghost,
.settings-confirm-actions .settings-danger-btn {
  width: 100%;
  min-height: 2.55rem;
  font-size: 0.88rem;
}
.settings-danger-btn {
  border: 1px solid #b23a2e;
  background: #b23a2e;
  color: #fff;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.settings-danger-btn:disabled { opacity: 0.55; cursor: default; }
.settings-confirm .form-msg { margin-top: 0.6rem; min-height: 1em; }
body.settings-sheet-open { overflow: hidden; }
@media (min-width: 900px) {
  .settings-sheet {
    left: max(0px, calc(50vw - 480px));
    right: max(0px, calc(50vw - 480px));
    width: auto;
    max-width: none;
    margin: 0;
  }
  .settings-scrim {
    left: max(0px, calc(50vw - 480px));
    right: max(0px, calc(50vw - 480px));
    width: auto;
  }
}
