/**
 * 流月笔记
 * 夜：纯黑 + 底部少量光线（对齐月历 dashboard-bg 底光）
 * 昼：淡紫青粉光底（有玻璃光感），侧栏/卡片/页脚不套玻璃壳
 * 加载：themeTokens → styles.css → siteTheme → 本文件
 */

/* ── 侧栏联络（首屏静态，不依赖 JS）── */
.flow-notes-rail__contact {
  margin: 0 0 1rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(40, 50, 80, 0.12);
  background: rgba(255, 255, 255, 0.42);
}

body.theme-night .flow-notes-rail__contact {
  border-color: rgba(230, 235, 255, 0.12);
  background: rgba(12, 14, 28, 0.35);
}

.flow-notes-rail__contact-line {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
}

.flow-notes-rail__contact-line + .flow-notes-rail__contact-line {
  margin-top: 0.28rem;
}

.flow-notes-rail__contact-mail {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.flow-notes-rail__contact-mail:hover {
  opacity: 0.85;
}

/* ── 社交：表内裁切 PNG（夜白 / 昼墨）── */
.flow-notes-social__pic {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
}

.flow-notes-social__img {
  grid-area: 1 / 1;
  display: block;
  width: 1.55rem;
  height: 1.55rem;
  object-fit: contain;
}

.flow-notes-social__img--day {
  display: none;
}

body.theme-day .flow-notes-social__img--night {
  display: none;
}

body.theme-day .flow-notes-social__img--day {
  display: block;
}

.flow-notes-social__item {
  width: 2.55rem;
  height: 2.55rem;
}

.flow-notes-social--with-pop {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

button.flow-notes-social__item {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button.flow-notes-social__item.is-open {
  outline: 1px solid rgba(120, 180, 230, 0.45);
  outline-offset: 2px;
  border-radius: 0.55rem;
}

.flow-notes-feishu-pop {
  position: absolute;
  left: 0;
  top: calc(100% + 0.55rem);
  z-index: 8;
  width: min(14rem, 86vw);
  padding: 0.85rem 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(120, 160, 200, 0.28);
  background: rgba(12, 18, 28, 0.94);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  text-align: center;
}

body.theme-day .flow-notes-feishu-pop {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(40, 100, 150, 0.16);
  box-shadow: 0 12px 28px rgba(40, 80, 120, 0.12);
}

.flow-notes-feishu-pop[hidden] {
  display: none !important;
}

.flow-notes-feishu-pop__lead {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  line-height: 1.4;
  opacity: 0.85;
}

.flow-notes-feishu-pop__qr {
  width: 168px;
  height: 168px;
  object-fit: cover;
  border-radius: 0.65rem;
  background: #fff;
}

.flow-notes-feishu-pop__cap {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  font-weight: 560;
}

.flow-notes-feishu-pop__link {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 0.16em;
  opacity: 0.8;
}

.stories-article-social {
  max-width: 40rem;
  margin: 0 auto 2.5rem;
  padding: 0 1.25rem;
}

.stories-article-social__label {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.65;
}

.flow-notes-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ══════════════════════════════════════
   夜晚 · 纯黑 + 底部少量光线（参考月历）
   ══════════════════════════════════════ */
body.theme-night.flow-notes-page--editorial,
html.theme-night body.flow-notes-page--editorial {
  background: #000 !important;
}

body.theme-night.flow-notes-page .flow-notes-bg,
body.theme-night.flow-notes-page--editorial .flow-notes-bg {
  opacity: 1 !important;
  background:
    /* 底部微光 · 对齐月历 dashboard-bg 底缘 */
    radial-gradient(ellipse 120% 70% at 50% 100%, rgba(2, 16, 42, 0.95), transparent 55%),
    radial-gradient(ellipse 90% 45% at 50% 100%, rgba(0, 90, 160, 0.16), transparent 58%),
    #000 !important;
}

body.theme-night.flow-notes-page .flow-notes-bg::before,
body.theme-night.flow-notes-page--editorial .flow-notes-bg::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 80% at 50% 100%, rgba(40, 140, 220, 0.1), transparent 62%),
    radial-gradient(ellipse 40% 50% at 32% 100%, rgba(80, 120, 200, 0.06), transparent 55%);
  filter: blur(18px);
  opacity: 0.9;
}

body.theme-night.flow-notes-page .flow-notes-bg::after,
body.theme-night.flow-notes-page--editorial .flow-notes-bg::after {
  content: none;
}

/* 右侧语言条 · 夜黑底可读（玻璃胶囊） */
body.theme-night.flow-notes-page--editorial .site-locale-switch {
  --locale-track: rgba(8, 10, 14, 0.55) !important;
  --locale-track-border: rgba(255, 255, 255, 0.22) !important;
  --locale-fg: rgba(255, 255, 255, 0.68) !important;
  --locale-fg-active: #121417 !important;
  --locale-pill: rgba(255, 255, 255, 0.96) !important;
  --locale-accent: rgba(45, 212, 191, 0.95) !important;
  border-color: var(--locale-track-border) !important;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 50%, rgba(0, 0, 0, 0.2) 100%),
    var(--locale-track) !important;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

body.theme-night.flow-notes-page--editorial .site-locale-bar__link {
  color: var(--locale-fg) !important;
  background: transparent !important;
}

body.theme-night.flow-notes-page--editorial .site-locale-switch__tab + .site-locale-switch__tab {
  border: none !important;
}

body.theme-night.flow-notes-page--editorial .site-locale-switch__tab:not(.is-active):hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

body.theme-night.flow-notes-page--editorial .site-locale-switch__tab.is-active {
  color: var(--locale-fg-active) !important;
  background: var(--locale-pill) !important;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* ══════════════════════════════════════
   白天 · 淡紫青粉光底（玻璃光感，无分块壳）
   ══════════════════════════════════════ */
body.theme-day.flow-notes-page--editorial {
  background: transparent !important;
}

body.theme-day.flow-notes-page .flow-notes-bg {
  opacity: 1 !important;
  pointer-events: none !important;
  background:
    radial-gradient(ellipse 60% 70% at 88% 22%, rgba(180, 120, 255, 0.48), transparent 58%),
    radial-gradient(ellipse 55% 60% at 10% 78%, rgba(60, 220, 230, 0.36), transparent 55%),
    radial-gradient(ellipse 50% 48% at 48% 8%, rgba(255, 140, 200, 0.34), transparent 52%),
    radial-gradient(ellipse 40% 40% at 70% 85%, rgba(120, 170, 255, 0.24), transparent 50%),
    linear-gradient(165deg, #eef3ff 0%, #e4ecfb 40%, #f6eaf6 100%) !important;
}

body.theme-day.flow-notes-page .flow-notes-bg::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  inset: -12%;
  pointer-events: none;
  background:
    radial-gradient(circle at 28% 32%, rgba(255, 255, 255, 0.5), transparent 42%),
    radial-gradient(circle at 72% 58%, rgba(200, 180, 255, 0.26), transparent 46%),
    radial-gradient(circle at 50% 80%, rgba(120, 220, 230, 0.18), transparent 44%);
  filter: blur(36px);
  opacity: 0.88;
}

body.theme-day.flow-notes-page .flow-notes-bg::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 90% 80% at 50% 40%, transparent 40%, rgba(230, 235, 250, 0.28) 100%);
  filter: none;
}

/* 飞书咨询群 · 流月笔记页脚 / 文章页 */
.flow-notes-consult {
  margin: 1.25rem 0 0.35rem;
  max-width: 22rem;
}

.flow-notes-consult[hidden] {
  display: none !important;
}

.stories-body .flow-notes-consult {
  margin: 1.5rem auto 2.5rem;
  padding: 0 1.25rem;
  max-width: 28rem;
}

.flow-notes-consult__inner {
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(120, 160, 200, 0.22);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

body.theme-day .flow-notes-consult__inner {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(40, 100, 150, 0.14);
}

.flow-notes-consult__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 560;
  opacity: 0.7;
}

.flow-notes-consult__lead {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.45;
  opacity: 0.88;
}

.flow-notes-consult__figure {
  margin: 0;
  text-align: center;
}

.flow-notes-consult__qr {
  display: inline-block;
  width: 168px;
  height: 168px;
  object-fit: cover;
  border-radius: 0.75rem;
  background: #fff;
}

.flow-notes-consult__cap {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  font-weight: 560;
}

.flow-notes-consult__link {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  opacity: 0.85;
}

/* MCP / 接入指南 · 配置模板 */
.stories-code-wrap {
  position: relative;
  margin: 0.75rem 0 1rem;
}

.stories-code-wrap .stories-code-block {
  margin: 0;
  padding-right: 5.5rem;
}

.stories-code-copy {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 1;
  font-size: 0.72rem !important;
  padding: 0.28rem 0.6rem !important;
}

.stories-code-block {
  display: block;
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  border-radius: 0.65rem;
  border: 1px solid rgba(100, 170, 230, 0.28);
  background: rgba(15, 24, 40, 0.88);
  color: rgba(230, 240, 255, 0.95);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre;
  user-select: all;
}

body.theme-day .stories-code-block {
  border-color: rgba(26, 90, 150, 0.22);
  background: #f4f7fb;
  color: #0f2740;
}
