/* 花汐阁 · 活跃解锁（本地预览独立文件，避免沿用缓存的 style.css?v=20261111r） */

.activity-unlock-item.is-action {
  cursor: pointer;
  border-radius: 8px;
  margin: 0 -0.15rem;
  padding-left: 0.3rem;
  padding-right: 0.3rem;
}
.activity-unlock-item.is-action:hover,
.activity-unlock-item.is-action:focus-within {
  background: #fff4ea;
}
.activity-unlock-item.is-locked { cursor: pointer; }
.activity-unlock-go {
  margin-left: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #c45c26;
}

/* —— 主页背景 —— */
.mine-profile-card.has-home-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  isolation: isolate;
}
.mine-profile-card.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.58), rgba(255,252,248,0.82));
}
.mine-profile-card.has-home-bg.is-home-bg-dark::before {
  background: linear-gradient(180deg, rgba(28,20,14,0.28), rgba(28,20,14,0.52));
}
.mine-profile-card.has-home-bg > * { position: relative; z-index: 1; }
.mine-profile-card.has-home-bg.is-home-bg-dark,
.mine-profile-card.has-home-bg.is-home-bg-dark .mine-nick,
.mine-profile-card.has-home-bg.is-home-bg-dark .mine-line,
.mine-profile-card.has-home-bg.is-home-bg-dark .mine-bio,
.mine-profile-card.has-home-bg.is-home-bg-dark .mine-activity,
.mine-profile-card.has-home-bg.is-home-bg-dark .mine-activity-label,
.mine-profile-card.has-home-bg.is-home-bg-dark .user-field-label,
.mine-profile-card.has-home-bg.is-home-bg-dark .user-field-body {
  color: #f7efe6;
}
.mine-profile-card.has-home-bg.is-home-bg-dark .mine-activity-num { color: #f0c08a; }
.mine-profile-card.has-home-bg.is-home-bg-dark .mine-activity-rank-btn {
  background: rgba(255,248,241,0.16);
  border-color: rgba(240,192,138,0.45);
  color: #f7efe6;
}
.mine-profile-card.has-home-bg.is-home-bg-dark .mine-checkin {
  background: linear-gradient(180deg, rgba(255,248,241,0.22), rgba(240,192,138,0.2));
  border-color: rgba(240,192,138,0.5);
  color: #f7efe6;
  box-shadow: none;
}
.mine-profile-card.has-home-bg.is-home-bg-dark .mine-checkin-bonus { color: #f0c08a; }
.mine-profile-card.has-home-bg.is-home-bg-dark .mine-checkin.is-done,
.mine-profile-card.has-home-bg.is-home-bg-dark .mine-checkin[disabled] {
  background: rgba(255,248,241,0.1);
  border-color: rgba(247,239,230,0.22);
  color: rgba(247,239,230,0.7);
}
.mine-profile-card.has-home-bg.is-home-bg-dark .mine-checkin-msg { color: #f0c08a; }
.mine-profile-card.has-home-bg.is-home-bg-dark .mine-checkin-msg.is-ok { color: #9ee0bc; }
.mine-profile-card.has-home-bg.is-home-bg-dark .mine-checkin-msg.is-err { color: #f3b0a8; }

/* —— 专属社区标识（4 式） —— */
.community-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
  vertical-align: middle;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
}
.community-badge.is-seal {
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.08rem;
  border: 1.5px solid #b42a1c;
  border-radius: 2px;
  color: #b42a1c;
  background: rgba(196, 42, 28, 0.06);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 0 0 1px rgba(180, 42, 28, 0.18);
  transform: rotate(-8deg);
}
.community-badge.is-jade {
  min-width: 1.55rem;
  height: 1.05rem;
  padding: 0 0.32rem;
  border-radius: 999px;
  border: 1px solid #6a9a86;
  background: linear-gradient(180deg, #e7f3ec, #cfe4d6);
  color: #2f6b52;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.community-badge.is-orchid {
  min-width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  border: 1px solid #d4a24a;
  background: radial-gradient(circle at 35% 30%, #fff6e4, #f0d090 55%, #c9973a);
  color: #7a4e12;
  font-size: 0.62rem;
  font-weight: 900;
  box-shadow: 0 0 0 2px rgba(212, 162, 74, 0.25);
}
.community-badge.is-ink {
  min-width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  border: 1px dashed #4a3a2c;
  background: #f6f1ea;
  color: #2c241c;
  font-size: 0.6rem;
  font-weight: 900;
  font-family: "Noto Serif SC", "Noto Sans SC", serif;
}

/* —— 发帖加精（4 式） —— */
.card.is-highlight,
.post-stage.is-highlight { position: relative; }
.highlight-mark {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  line-height: 1;
  font-weight: 900;
}
.card.is-highlight-seal {
  box-shadow: 0 0 0 2px #d7b56a, 0 0 0 3px #9a2b1f, 0 6px 16px rgba(154, 43, 31, 0.12);
  border-color: #d7b56a;
}
.card.is-highlight-seal .highlight-mark,
.post-stage.is-highlight-seal .highlight-mark {
  top: 0.4rem;
  right: 0.4rem;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border: 2px solid #b42a1c;
  border-radius: 3px;
  color: #b42a1c;
  background: rgba(255, 248, 241, 0.92);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  transform: rotate(12deg);
  box-shadow: 0 0 0 1px rgba(180, 42, 28, 0.2);
}
.card.is-highlight-glow {
  box-shadow: 0 0 0 1px #f0c48a, 0 0 18px rgba(196, 92, 38, 0.35), 0 8px 20px rgba(196, 92, 38, 0.12);
  border-color: #e8b56a;
}
.card.is-highlight-glow .highlight-mark,
.post-stage.is-highlight-glow .highlight-mark {
  top: 0.45rem;
  right: 0.45rem;
  padding: 0.12rem 0.38rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #f3d090, #c45c26);
  color: #fff;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  box-shadow: 0 0 10px rgba(196, 92, 38, 0.45);
}
.card.is-highlight-ribbon { overflow: hidden; }
.card.is-highlight-ribbon .highlight-mark,
.post-stage.is-highlight-ribbon .highlight-mark {
  top: 0.7rem;
  left: -1.15rem;
  width: 4.4rem;
  padding: 0.18rem 0;
  text-align: center;
  background: #c45c26;
  color: #fff8f1;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(80, 40, 16, 0.2);
}
.card.is-highlight-ink .card-title {
  border-left: 3px solid #4a3a2c;
  padding-left: 0.4rem;
  letter-spacing: 0.06em;
}
.card.is-highlight-ink .highlight-mark,
.post-stage.is-highlight-ink .highlight-mark {
  top: 0.35rem;
  left: 0.35rem;
  writing-mode: vertical-rl;
  padding: 0.25rem 0.12rem;
  border: 1px solid #4a3a2c;
  background: rgba(255, 248, 241, 0.92);
  color: #2c241c;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  font-family: "Noto Serif SC", "Noto Sans SC", serif;
}
.post-stage.is-highlight-seal,
.post-stage.is-highlight-glow,
.post-stage.is-highlight-ribbon,
.post-stage.is-highlight-ink { }
.post-stage.is-highlight-seal .post-title,
.post-stage.is-highlight-ink .post-title { padding-right: 2.2rem; }
.card-highlight-btn {
  margin: 0;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #e2c4a8;
  background: #fffaf5;
  color: #8a5a32;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}
.card-highlight-btn.is-on {
  border-color: #c45c26;
  background: #c45c26;
  color: #fff8f1;
}

/* —— 排行榜展示框（4 式） —— */
.activity-rank-row.is-frame-gold {
  border: 2px solid #d4a24a;
  box-shadow: 0 0 0 1px #f3e2b8, 0 4px 14px rgba(180, 130, 40, 0.18);
  background: linear-gradient(180deg, #fff8e8, #fff);
}
.activity-rank-row.is-frame-cinnabar {
  border: 2px solid #b42a1c;
  background: linear-gradient(180deg, #fff4ee, #fff);
  box-shadow: 0 4px 14px rgba(180, 42, 28, 0.12);
  position: relative;
}
.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;
}
.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);
}

/* —— 设置面板 / 轻提示 —— */
.unlock-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h, 56px) + 1.2rem + var(--safe-bottom, 0px));
  transform: translate(-50%, 8px);
  max-width: min(22rem, calc(100% - 2rem));
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  background: rgba(44, 36, 28, 0.92);
  color: #fff8f1;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  z-index: 3200;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.unlock-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 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;
  padding: 0.95rem 1rem 1rem;
  border-radius: 16px;
  background: #fffaf5;
  box-shadow: 0 16px 40px rgba(80, 48, 20, 0.2);
}
.unlock-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}
.unlock-sheet-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  color: #4a3a2c;
}
.unlock-sheet-sub {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #8a6a4a;
}
.unlock-sheet-close {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: #f3eee8;
  color: #6a5a4a;
  font-size: 1.1rem;
  cursor: pointer;
}
.unlock-style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.unlock-style-opt {
  margin: 0;
  padding: 0.7rem 0.65rem 0.65rem;
  border-radius: 12px;
  border: 1px solid #eadfd3;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.unlock-style-opt.is-on {
  border-color: #c45c26;
  box-shadow: 0 0 0 2px rgba(196, 92, 38, 0.18);
  background: #fff8f1;
}
.unlock-style-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: #4a3a2c;
}
.unlock-style-desc {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  line-height: 1.4;
  color: #8a6a4a;
}
.unlock-style-preview {
  margin-top: 0.45rem;
  min-height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.unlock-sheet-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.unlock-tabs {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 0.7rem;
}
.unlock-tab {
  flex: 1;
  padding: 0.4rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #eadfd3;
  background: #fff;
  color: #6a5a4a;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}
.unlock-tab.is-on {
  background: #c45c26;
  border-color: #c45c26;
  color: #fff8f1;
}
.unlock-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0 0.7rem;
}
.unlock-preset {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #d8c8b4;
  cursor: pointer;
  padding: 0;
}
.unlock-preset.is-on { box-shadow: 0 0 0 2px #c45c26; }
.unlock-color-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}
.unlock-color-row input[type="color"] {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: 1px solid #eadfd3;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.unlock-bg-preview {
  height: 6.2rem;
  border-radius: 12px;
  border: 1px solid #eadfd3;
  background: #fff8f1 center/cover no-repeat;
  margin-bottom: 0.7rem;
  display: flex;
  align-items: flex-end;
  padding: 0.55rem 0.7rem;
  color: #4a3a2c;
  font-size: 0.78rem;
  font-weight: 800;
  position: relative;
  overflow: hidden;
}
.unlock-bg-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(255,248,241,0.7));
  pointer-events: none;
}
.unlock-bg-preview span { position: relative; z-index: 1; }
.unlock-file-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #e2c4a8;
  background: #fff;
  color: #8a5a32;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}
.unlock-file-pill input { display: none; }
.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.5rem;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  border: 1px solid #eadfd3;
  background: #fff;
}
.unlock-hl-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: #4a3a2c;
}
.unlock-hl-meta {
  margin: 0.12rem 0 0;
  font-size: 0.68rem;
  color: #8a6a4a;
}

@media (prefers-reduced-motion: reduce) {
  .unlock-toast { transition: none; }
}

/* —— 本地测试全部解锁提示（仅 file:// / localhost 会出现） —— */
.activity-unlocks-preview-hint {
  display: inline-block;
  margin: 0.28rem 0 0;
  padding: 0.08rem 0.42rem;
  border-radius: 99px;
  background: #fff3e4;
  border: 1px solid #f0c9a0;
  color: #b45a1e;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.activity-unlocks-preview-actions {
  margin: 0.55rem 0 0;
}
.activity-unlocks-preview-toggle {
  appearance: none;
  font-family: inherit;
  border: 1px solid #e0c8ae;
  background: #fffaf4;
  color: #8a5a32;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.28rem 0.7rem;
  border-radius: 99px;
  cursor: pointer;
}
.activity-unlocks-preview-toggle:hover,
.activity-unlocks-preview-toggle:focus-visible {
  background: #fff4ea;
  border-color: #c45c26;
  color: #c45c26;
  outline: none;
}

/* Image-share captions stay absolutely at the bottom of the photo.
   Do not set .post-caption { position: relative } — unlocks.css loads after
   style.css, so that would put the title/body under the header. */
body.post-page:not(.is-article) .post-caption,
body.post-page:not(.is-article) #post-caption {
  position: absolute;
}
