/*
 * Theme Name: Personal Notes for Typecho
 * Author: Site Owner
 * Description: A minimal Typecho theme with four reading color schemes.
 * Version: 1.0.0
 */

:root {
  --frame-width: 900px;
  --sidebar-width: 220px;
  --layout-gap: 56px;
  --panel-border-soft: color-mix(in srgb, var(--accent-color) 18%, var(--border-color));
  --panel-bg-subtle: color-mix(in srgb, var(--bg-card) 46%, transparent);
  --divider-color: color-mix(in srgb, var(--border-color) 55%, transparent);
  --interactive-hover: color-mix(in srgb, var(--text-primary) 5%, transparent);
}

:root,
[data-theme="old-paper"] {
  /* 旧纸 —— 米黄纸面，墨绿重音 */
  --bg-primary: #f3ead2;
  --bg-secondary: #eee3c8;
  --bg-card: #f8f2df;
  --bg-modal: #f8f2df;
  --text-primary: #2e382f;
  --text-secondary: #4a544b;
  --text-muted: #626b61;
  --border-color: #d9ceb2;
  --border-subtle: #e6dcc4;
  --accent-color: #3f654f;
  --accent-soft: rgba(63, 101, 79, 0.08);
  --badge-bg: #e8ddc0;
  --badge-text: #35543f;
  --shadow-soft: 0 8px 30px rgba(46, 56, 47, 0.06);
  --shadow-modal: 0 20px 50px rgba(30, 38, 31, 0.16);
}

[data-theme="ink-painting"] {
  /* 水墨画 —— 宣纸底 + 水墨山水中景，配打字机字体 */
  --bg-primary: #f6f0e4;
  --bg-secondary: #efe7d7;
  --bg-card: #f8f3e8;
  --bg-modal: #f8f3e8;
  --text-primary: #1b1a17;
  --text-secondary: #4b463c;
  --text-muted: #6b6459;
  --border-color: #cabfa6;
  --border-subtle: #ded3bb;
  --accent-color: #3d3830;
  --accent-soft: rgba(27, 26, 23, 0.06);
  --badge-bg: #e8dfc8;
  --badge-text: #3a3428;
  --shadow-soft: 0 8px 30px rgba(27, 26, 23, 0.08);
  --shadow-modal: 0 20px 50px rgba(27, 26, 23, 0.2);
}

[data-theme="typewriter"] {
  /* 打字机 —— post-ribbon：米白纸纤维 + 墨黑 + 打字机字体 */
  --bg-primary: #f3eedf;
  --bg-secondary: #ece5d2;
  --bg-card: #f7f2e4;
  --bg-modal: #f7f2e4;
  --text-primary: #181713;
  --text-secondary: #4e483b;
  --text-muted: #625e52;
  --border-color: #c8bda3;
  --border-subtle: #ddd3bb;
  --accent-color: #4a4232;
  --accent-soft: rgba(24, 23, 19, 0.06);
  --badge-bg: #e6dfc9;
  --badge-text: #3a3426;
  --shadow-soft: 0 8px 30px rgba(24, 23, 19, 0.06);
  --shadow-modal: 0 20px 50px rgba(24, 23, 19, 0.18);
}

[data-theme="moss-ink"] {
  /* 苔墨 —— 松绿纸面 */
  --bg-primary: #dfe9d8;
  --bg-secondary: #d1dfcd;
  --bg-card: #f0f3e8;
  --bg-modal: #f0f3e8;
  --text-primary: #1f3829;
  --text-secondary: #34473a;
  --text-muted: #546756;
  --border-color: #b5c8b4;
  --border-subtle: #c9d9c6;
  --accent-color: #2d6546;
  --accent-soft: rgba(45, 101, 70, 0.09);
  --badge-bg: #d1dfcd;
  --badge-text: #245239;
  --shadow-soft: 0 8px 30px rgba(31, 56, 41, 0.06);
  --shadow-modal: 0 20px 50px rgba(20, 32, 24, 0.16);
}

[data-theme="moon-white"] {
  /* 月白 —— 青灰纸面（默认） */
  --bg-primary: #e9ece8;
  --bg-secondary: #dde5e1;
  --bg-card: #f4f6f2;
  --bg-modal: #f4f6f2;
  --text-primary: #27383a;
  --text-secondary: #3f5052;
  --text-muted: #5c6868;
  --border-color: #c6ccc6;
  --border-subtle: #d6dcd6;
  --accent-color: #3d686c;
  --accent-soft: rgba(61, 104, 108, 0.08);
  --badge-bg: #dde5e1;
  --badge-text: #2f5457;
  --shadow-soft: 0 8px 30px rgba(39, 56, 58, 0.05);
  --shadow-modal: 0 20px 50px rgba(24, 36, 38, 0.14);
}

[data-theme="night"] {
  /* 夜间 */
  --bg-primary: #161c25;
  --bg-secondary: #1e2732;
  --bg-card: #1a222c;
  --bg-modal: #1e2732;
  --text-primary: #e3ebf8;
  --text-secondary: #b9c4d6;
  --text-muted: #9eabc1;
  --border-color: #2c3544;
  --border-subtle: #232c39;
  --accent-color: #adc6f5;
  --accent-soft: rgba(173, 198, 245, 0.12);
  --badge-bg: #232c39;
  --badge-text: #c9daf9;
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.28);
  --shadow-modal: 0 20px 50px rgba(0, 0, 0, 0.55);
}

/* 水墨画背景是一整张 cover 的大图，挂在 body 上时布局一变就整页重绘。
   同样挪到固定图层，只让合成器搬一次。 */
html[data-theme="ink-painting"] body {
  background-color: #f6f0e4;
  background-image: none;
}

html[data-theme="ink-painting"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("assets/img/textures/ink-painting.jpg");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  pointer-events: none;
  transform: translateZ(0);
}

/* 打字机主题的纸纤维是一张大尺寸 SVG 平铺纹理，挂在 body 上时
   每次布局变化（比如展开发布框）都要整页重铺一遍，卡顿的来源。
   改成固定的独立图层，纹理由合成器搬一次即可，不再逐帧重绘。 */
html[data-theme="typewriter"] body {
  background-image: none;
  position: relative;
}

html[data-theme="typewriter"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("assets/img/textures/paper-fiber.svg");
  background-size: 640px 640px;
  pointer-events: none;
  transform: translateZ(0);
}

html[data-theme="old-paper"] body {
  background-image: url("assets/img/textures/paper.png");
  background-size: 180px 180px;
}

html[data-theme="moss-ink"] body {
  background-image: url("assets/img/textures/pine.png");
  background-size: 102px 102px;
}

html[data-theme="moon-white"] body {
  background-image: url("assets/img/textures/moon.png");
  background-size: 180px 180px;
}

html[data-theme="night"] body {
  background-image:
    linear-gradient(to right, rgba(44, 53, 68, 0.2) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(44, 53, 68, 0.2) 1px, transparent 1px);
  background-size: 5px 5px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  /* 与参考站一致：不强制灰度抗锯齿，保留系统默认（macOS 上笔画更实） */
}

body {
  background-color: var(--bg-primary);
  background-image: url("assets/img/textures/moon.png");
  background-size: 180px 180px;
  background-position: center top;
  color: var(--text-primary);
  font-family: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  font-size: 13px;
  line-height: 1.82;
  letter-spacing: 0;
  transition: background-color 0.35s ease, color 0.35s ease;
  min-height: 100vh;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--accent-color);
}

.empty-state {
  color: var(--text-muted);
  padding: 24px 0;
}

.site-wrapper {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 56px;
  align-items: start;
}

.site-header {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 0;
  height: 100vh;
  padding-top: 78px;
  padding-bottom: 8px;
  border: 0;
  margin: 0;
}

.header-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.site-branding {
  display: none;
  flex-direction: column;
  align-items: flex-start;
}

.site-logo-mark {
  display: none;
  width: 94px;
  aspect-ratio: 800 / 320;
  background-color: var(--logo-blue, #1d3d6c);
  -webkit-mask: url("assets/img/logo-diandizhaji.svg?v=5") no-repeat center / contain;
  mask: url("assets/img/logo-diandizhaji.svg?v=5") no-repeat center / contain;
}

@media (max-width: 760px) {
  .site-branding {
    margin-left: calc(-9.7px - 1.1vw);
  }

  .site-branding .site-logo-mark {
    display: block;
  }

  .site-branding .site-title,
  .site-branding .site-subtitle {
    display: none;
  }
}

.site-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.site-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.04em;
}

/* 左侧竖排导航 */
.site-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.site-nav .nav-link,
.site-nav button.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  margin: 0.625rem 0;
  padding: 0 0.18rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: color-mix(in srgb, var(--text-muted) 78%, transparent);
  transition: color 0.2s ease, background-color 0.2s ease, text-decoration-color 0.2s ease;
}

.site-nav .nav-link:hover,
.site-nav .nav-link.current {
  color: var(--bg-primary);
  background: var(--text-primary);
  text-decoration-color: transparent;
}

/* 主题切换（调色板图标） */
.sidebar-tools {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  margin-bottom: auto;
  min-height: 44px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.12s ease;
}

.icon-btn:hover {
  color: var(--text-primary);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* 左下角站点标识 */
.sidebar-profile {
  margin-top: auto;
  width: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  padding: 0 0 6px;
  border: 0;
  background: transparent;
}

.sidebar-logo {
  display: block;
  width: 100%;
  aspect-ratio: 800 / 320;
  background-color: var(--logo-blue, #1d3d6c);
  -webkit-mask: url("assets/img/logo-diandizhaji.svg?v=5") no-repeat center / contain;
  mask: url("assets/img/logo-diandizhaji.svg?v=5") no-repeat center / contain;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.sidebar-profile:hover .sidebar-logo {
  opacity: 0.72;
}

.mobile-tools {
  display: none;
  align-items: center;
  gap: 10px;
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  color: var(--text-secondary);
  padding: 2px;
  font-family: inherit;
  cursor: pointer;
  line-height: 0;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 40px;
  background: var(--bg-primary);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  will-change: opacity, transform;
  transition: opacity 0.26s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.34s;
}

.mobile-drawer.open {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.26s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-drawer-head,
.mobile-drawer-links > * {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-drawer.open .mobile-drawer-head,
.mobile-drawer.open .mobile-drawer-links > * {
  opacity: 1;
  transform: none;
}

.mobile-drawer.open .mobile-drawer-head {
  transition-delay: 0.04s;
}

.mobile-drawer.open .mobile-drawer-links > *:nth-child(1) { transition-delay: 0.06s; }
.mobile-drawer.open .mobile-drawer-links > *:nth-child(2) { transition-delay: 0.09s; }
.mobile-drawer.open .mobile-drawer-links > *:nth-child(3) { transition-delay: 0.12s; }
.mobile-drawer.open .mobile-drawer-links > *:nth-child(4) { transition-delay: 0.15s; }
.mobile-drawer.open .mobile-drawer-links > *:nth-child(5) { transition-delay: 0.18s; }
.mobile-drawer.open .mobile-drawer-links > *:nth-child(6) { transition-delay: 0.21s; }
.mobile-drawer.open .mobile-drawer-links > *:nth-child(7) { transition-delay: 0.24s; }
.mobile-drawer.open .mobile-drawer-links > *:nth-child(8) { transition-delay: 0.27s; }

@media (prefers-reduced-motion: reduce) {
  .mobile-drawer,
  .mobile-drawer-head,
  .mobile-drawer-links > * {
    transition: none;
    transform: none;
  }
}

html.drawer-open {
  overflow: hidden;
}

.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 27vh;
}

.mobile-drawer-title {
  font-size: 0.95rem;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
}

.mobile-drawer-close {
  border: 0;
  background: none;
  color: var(--text-secondary);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}

.mobile-drawer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px 0;
  width: 56%;
  max-width: 252px;
  margin: 0 auto;
  justify-items: center;
  text-align: center;
}

.mobile-drawer-links a,
.mobile-drawer-links button {
  display: inline-block;
  margin: 0;
  padding: 0;
  font: inherit;
  font-size: 1.02rem;
  line-height: inherit;
  color: var(--text-secondary);
  background: none;
  border: 0;
  text-align: left;
  vertical-align: baseline;
  cursor: pointer;
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-drawer-links a.current {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: var(--text-primary);
}

.site-main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  padding: 78px 0 72px;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-right: 18px;
}

.post-card {
  padding: 18px 0 34px;
  margin: 0;
  border-bottom: 0;
}

.post-card:first-child {
  padding-top: 4px;
}

.post-card:last-child {
  border-bottom: none;
}

.post-card-header {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.post-card-title {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.32;
}

.post-card-title a {
  padding: 0 0.08em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, var(--text-primary) 62%, transparent);
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.post-card-title a:hover {
  text-decoration-color: var(--text-primary);
}

.post-card-category {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.post-card-excerpt {
  color: color-mix(in srgb, var(--text-primary) 92%, var(--text-muted));
  font-size: 0.88rem;
  line-height: 1.9;
  margin: 0 0 12px;
  text-align: justify;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.read-more-link {
  color: var(--text-secondary);
  font-size: 0.76rem;
  border-bottom: 0;
  padding: 0 0.08em;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.read-more-link:hover {
  color: var(--bg-primary);
  background: var(--text-primary);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 22px 0 0;
  padding: 0;
  border-top: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pagination-bar a,
.pagination-bar span.disabled {
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.pagination-bar a:hover {
  color: var(--bg-primary);
  background: var(--text-primary);
}

.pagination-bar .pagination-status {
  color: var(--text-muted);
  text-decoration: none;
}

.pagination-bar span.disabled {
  color: var(--text-muted);
  opacity: 0.45;
  text-decoration: none;
  cursor: not-allowed;
}

.page-hero {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.page-hero-en {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
}

.page-hero-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.page-hero-quote {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.single-article-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.single-article-title {
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
}

.single-article-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.entry-content {
  font-size: 0.96rem;
  line-height: 2;
  color: var(--text-primary);
}

.entry-content p {
  margin-bottom: 2em;
  text-align: justify;
}

.entry-content h2,
.entry-content h3 {
  margin: 1.8em 0 0.8em;
  font-weight: 600;
}

.entry-content blockquote {
  margin: 1.6em 0;
  padding: 12px 20px;
  border-left: 3px solid var(--accent-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.95rem;
  border-radius: 0 6px 6px 0;
}

.entry-content figure {
  margin: 2em 0;
  text-align: center;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.entry-content figcaption {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.article-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 42px 0 36px;
}

.action-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 999px;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-pill:hover,
.action-pill.liked {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: var(--accent-soft);
}

.about-quick-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.about-quick-item button,
.about-quick-item a {
  color: var(--accent-color);
  background: none;
  border: none;
  border-bottom: 1px dashed var(--accent-color);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  padding: 0 2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 18px;
  text-align: center;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
}

.project-tabs {
  margin: 28px 0 36px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  overflow: hidden;
}

.project-tab-nav {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.project-tab-btn {
  flex: 1;
  padding: 10px 12px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.project-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
}

.project-tab-pane {
  display: none;
  padding: 20px;
  font-size: 0.92rem;
}

.project-tab-pane.active {
  display: block;
}

.project-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.project-desc {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.link-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-color);
}

.link-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.link-title-wrap::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-color);
  opacity: 0.72;
  margin-left: 8px;
  flex: 0 0 auto;
}

.link-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.records-timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}

.record-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px 24px;
}

.record-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.record-tag {
  background: var(--badge-bg);
  color: var(--badge-text);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.record-body {
  font-size: 0.96rem;
  color: var(--text-primary);
  line-height: 1.85;
}

.archive-year-block {
  margin-bottom: 32px;
}

.archive-year-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-color);
}

.archive-post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.archive-post-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.94rem;
}

.archive-post-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: monospace;
  flex-shrink: 0;
}

.comments-area {
  margin-top: 46px;
  padding-top: 30px;
  border-top: 1px solid var(--border-subtle);
}

/* 游客评论盒子 */
.comment-respond {
  margin-bottom: 26px;
}

.comment-form {
  border: 1px solid var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  background: color-mix(in srgb, var(--bg-primary) 90%, var(--bg-card) 10%);
}

.comment-form-head {
  margin: 0;
  padding: 12px 14px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-editor {
  display: block;
  width: 100%;
  min-height: 130px;
  border: 0;
  padding: 12px 14px;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.75;
  resize: vertical;
  outline: none;
}

.comment-editor::placeholder {
  color: var(--text-muted);
}

.comment-login-tip {
  margin: 0;
  padding: 0 14px 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.comment-login-tip a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.comment-profile {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr auto;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--bg-primary) 84%, var(--bg-card) 16%);
  animation: commentProfileIn 0.18s ease both;
}

.comment-profile[hidden] {
  display: none;
}

.comment-form.is-editing-profile .comment-toolbar {
  display: none;
}

@keyframes commentProfileIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.comment-profile-input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: color-mix(in srgb, var(--bg-card) 55%, transparent);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.78rem;
  padding: 0 9px;
}

.comment-profile-input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.comment-profile-save {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: color-mix(in srgb, var(--bg-card) 55%, transparent);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}

.comment-profile-save:hover {
  border-color: var(--accent-color);
  color: var(--text-primary);
}

.comment-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-top: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--bg-primary) 84%, var(--bg-card) 16%);
}

.comment-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-toolbar-right a {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.comment-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.comment-tool:hover {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.comment-submit {
  color: var(--accent-color);
}

/* 贴纸面板 */
.sticker-popover {
  display: none;
  flex-direction: column;
  padding: 10px 12px 12px;
  border-top: 1px dashed var(--border-color);
  background: var(--bg-primary);
}

.sticker-popover.open {
  display: flex;
}

.sticker-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-color);
}

.sticker-tab {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.76rem;
  padding: 4px 8px;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  margin-bottom: -9px;
  padding-bottom: 9px;
}

.sticker-tab.is-active {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}

.sticker-close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.sticker-close:hover {
  color: var(--text-primary);
}

.sticker-popover .sticker-panel[hidden] {
  display: none;
}

.sticker-panel[data-sticker-panel="emoji"] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
  gap: 2px;
  max-height: 188px;
  overflow-y: auto;
  padding-top: 8px;
}

.sticker-emoji {
  width: 100%;
  height: 32px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.sticker-emoji:hover {
  background: color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.sticker-panel[data-sticker-panel="sticker"] {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 170px;
  overflow-y: auto;
  padding-top: 8px;
}

.sticker-chip {
  font-size: 0.74rem;
  padding: 3px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  cursor: pointer;
  color: var(--text-secondary);
  white-space: nowrap;
}

.sticker-chip:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* 评论数 */
.comment-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.comment-count svg {
  flex: 0 0 auto;
}

.comment-count-dot {
  color: color-mix(in srgb, var(--text-muted) 70%, transparent);
}

.comment-count-num {
  color: var(--text-primary);
}

/* 评论列表 */
.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.comment-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  padding: 0;
  border: 0;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  padding: 2px;
  background: var(--bg-card);
  object-fit: cover;
  display: block;
}

.comment-main {
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 6px;
  row-gap: 3px;
  font-size: 0.88rem;
  line-height: 1.2;
}

.comment-author {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.comment-date {
  flex: 0 0 100%;
  order: 10;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-blogger,
.badge-friend {
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--badge-bg);
  color: var(--badge-text);
}

.comment-body {
  margin-top: 8px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.comment-body p {
  margin: 0 0 6px;
}

.comment-body p:last-child {
  margin-bottom: 0;
}

.comment-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.comment-actions button,
.comment-actions a {
  background: none;
  border: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
}

.comment-actions button:hover,
.comment-actions a:hover {
  color: var(--text-primary);
}
.site-footer {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: calc(var(--sidebar-width) + var(--layout-gap)) minmax(0, 1fr) auto;
  align-items: end;
  padding: 28px 0 10px;
  font-size: 0.64rem;
  color: var(--text-muted);
}

.site-footer-tagline {
  grid-column: 2 / 4;
  justify-self: start;
}

.site-footer-bottom {
  grid-column: 2 / 4;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 18px;
  min-width: 0;
}

.site-footer-line {
  margin: 0;
  letter-spacing: 0.04em;
}

.site-footer-meta {
  min-width: 0;
}

.site-footer-right {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.site-footer-right a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1px;
}

.site-footer-right a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0s linear 0.3s;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.24s ease;
}

.modal-backdrop.active .modal-dialog {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop,
  .modal-dialog {
    transition: none;
  }

  .modal-dialog {
    transform: none;
  }
}

.modal-dialog {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 100%;
  max-width: 380px;
  padding: 24px;
  box-shadow: var(--shadow-modal);
  position: relative;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.modal-title {
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.modal-close {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  background: none;
  border: 0;
  color: var(--text-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 3;
}

.theme-dialog {
  max-width: 792px;
  padding: 31px 34px 36px;
}

.theme-dialog .modal-title {
  margin-bottom: 20px;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.theme-option-btn {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
}

.theme-preview {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 14px 13px;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.theme-option-btn:hover .theme-preview,
.theme-option-btn.active .theme-preview {
  border-color: var(--accent-color);
  box-shadow: inset 0 0 0 1px var(--accent-color);
}

.tp-line {
  display: block;
  height: 2px;
  margin-bottom: 7px;
  background: currentColor;
  opacity: 0.62;
}

.tp-line:nth-child(2) {
  width: 84%;
}

.tp-line:nth-child(3) {
  width: 94%;
}

.tp-bar {
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 13px;
  height: 7px;
  background: currentColor;
  opacity: 0.78;
}

.theme-preview-old {
  background-color: #f3ead2;
  background-image: url("assets/img/textures/paper.png");
  background-size: 180px 180px;
  color: #354966;
}

.theme-preview-pine {
  background-color: #dfe9d8;
  background-image: url("assets/img/textures/pine.png");
  background-size: 102px 102px;
  color: #34492f;
}

.theme-preview-moon {
  background-color: #e9ece8;
  background-image: url("assets/img/textures/moon.png");
  background-size: 180px 180px;
  color: #27383a;
}

.theme-preview-ink {
  /* 加深一档：底色压暗 + 叠一层极淡的墨色，让水墨纹理更实 */
  background-color: #e6dcc6;
  background-image:
    linear-gradient(rgba(27, 26, 23, 0.09), rgba(27, 26, 23, 0.09)),
    url("assets/img/textures/ink-painting.jpg");
  background-size: cover, cover;
  background-position: center, center;
  color: #1b1a17;
}

.theme-preview-type {
  /* 打字机同样加深：底色压暗 + 一层浅墨，纸纤维更明显 */
  background-color: #e8dfc8;
  background-image:
    linear-gradient(rgba(24, 23, 19, 0.08), rgba(24, 23, 19, 0.08)),
    url("assets/img/textures/paper-fiber.svg");
  background-size: auto, 160px 160px;
  color: #181713;
}

.theme-preview-night {
  background-color: #161c25;
  background-image:
    linear-gradient(to right, rgba(44, 53, 68, 0.24) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(44, 53, 68, 0.24) 1px, transparent 1px);
  background-size: 5px 5px;
  color: #e3ebf8;
}

.theme-option-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

.theme-option-btn.active .theme-option-name {
  color: var(--text-primary);
  font-weight: 600;
}

@media (max-width: 640px) {
  /* 主题选择：移动端收窄居中，行式卡片（色块在左、名称在右） */
  .modal-backdrop {
    padding: 5vw;
  }

  .theme-dialog {
    width: 82vw;
    max-width: 360px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 19px 17px 22px;
    border-radius: 8px;
    transform: translateY(20px) scale(0.98);
    transition: opacity 0.26s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .modal-backdrop.active .theme-dialog {
    transform: translateY(0);
  }

  .theme-dialog .modal-title {
    margin-bottom: 14px;
    font-size: 1rem;
  }

  .theme-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .theme-option-btn {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    text-align: left;
  }

  .theme-option-btn.active {
    border-color: var(--accent-color);
  }

  .theme-preview {
    flex: 0 0 34%;
    width: 34%;
    aspect-ratio: 3 / 2;
    padding: 10px;
    border-radius: 2px;
  }

  .tp-line {
    height: 2px;
    margin-bottom: 5px;
  }

  .theme-option-name {
    font-size: 0.95rem;
  }
}

.login-field {
  margin-bottom: 14px;
}

.login-field input[type="text"],
.login-field input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
}

.login-remember {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.modal-primary-btn {
  width: 100%;
  padding: 10px;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}


/* ===== 关于页：赞赏 / 名单 ===== */
.donate-dialog,
.thanks-dialog {
  max-width: 340px;
}

.donate-dialog {
  max-width: 320px;
  padding: 24px 20px 20px;
  border-radius: 3px;
  background: var(--bg-primary);
}

.donate-dialog .modal-title {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  text-align: center;
}

.donate-dialog .modal-close {
  top: 14px;
  right: 14px;
  font-size: 1.06rem;
}

.donate-tabs {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 0 0 16px;
}

.donate-tab {
  padding: 4px 2px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.donate-tab.is-active {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}

.donate-qr {
  display: flex;
  justify-content: center;
  width: 228px;
  margin: 0 auto;
  padding: 13px;
  border: 1px solid var(--divider-color);
  border-radius: 2px;
  background: transparent;
}

.donate-qr img {
  display: block;
  width: 200px;
  height: 200px;
  filter: none;
  opacity: 1;
}

[data-theme="night"] .donate-qr {
  padding: 20px;
  border-radius: 4px;
  background: #f2efe6;
}

.thanks-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.thanks-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--divider-color);
  font-size: 0.82rem;
}

.thanks-list li:last-child {
  border-bottom: 0;
}

.thanks-date {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.thanks-empty {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

/* ===== 切回页面时的开屏动画 ===== */
.site-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-primary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.site-splash.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.site-splash-card {
  width: min(660px, 100%);
  padding: 56px 40px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  text-align: center;
}

.site-splash-kicker {
  margin: 0 0 18px;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-splash-text {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .site-splash-card {
    padding: 40px 24px;
  }

  .site-splash-text {
    font-size: 1.05rem;
  }
}

/* ===== TEPoster 海报按钮（沿用主题 pill 样式） ===== */
.article-actions .teposter-button-wrap {
  display: inline-flex;
}

.article-actions .teposter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 999px;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.article-actions .teposter-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: var(--accent-soft);
}

/* ===== 说说工具栏 ===== */
.memo-compose-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.memo-tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.memo-tool:hover {
  border-color: var(--accent-color);
  color: var(--text-primary);
}

#memo-image-input {
  display: none;
}

.memo-compose-hint.is-error {
  color: #b4453a;
}

/* ===== 视频嵌入 ===== */
.video-embed {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 14px 0 6px;
}

.video-ratio-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  padding: 3px 11px;
  font-family: inherit;
  font-size: 0.68rem;
  line-height: 1.5;
  color: #f4f1e9;
  background: rgba(12, 14, 14, 0.55);
  text-decoration: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s ease, background-color 0.18s ease;
}

.video-embed:hover .video-ratio-toggle,
.video-embed:focus-within .video-ratio-toggle {
  opacity: 1;
}

.video-ratio-toggle:hover {
  background: rgba(12, 14, 14, 0.78);
}

@media (hover: none) {
  .video-ratio-toggle {
    opacity: 0.88;
  }
}

.video-embed-fallback {
  display: block;
  margin-top: 6px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.video-embed-fallback:hover {
  color: var(--text-primary);
}

.video-embed iframe {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 6px;
  background: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.video-embed.is-vertical iframe {
  max-width: 330px;
  aspect-ratio: 9 / 16;
}

.video-card {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0;
  padding: 9px 16px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.86rem;
}

.video-card:hover {
  border-color: var(--accent-color);
  color: var(--text-primary);
}

.video-card-play {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--bg-primary);
  font-size: 0.6rem;
}

/* ===== 抖音视频嵌入 ===== */
.douyin-embed {
  display: flex;
  justify-content: center;
  margin: 14px 0 6px;
}

.douyin-embed iframe {
  width: 100%;
  max-width: 330px;
  aspect-ratio: 9 / 16;
  border: 0;
  border-radius: 6px;
  background: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

/* ===== 相册 ===== */
.album-back {
  margin-bottom: 14px;
  font-size: 0.76rem;
}

.album-back a {
  color: var(--text-muted);
  text-decoration: none;
}

.album-back a:hover {
  color: var(--text-primary);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.album-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--text-primary);
}

.album-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--bg-card);
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.album-card:hover .album-cover img {
  transform: scale(1.04);
}

.album-cover-blur {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--text-primary) 10%, transparent), transparent),
    var(--bg-secondary);
  filter: blur(2px);
}

.album-lock {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  padding: 4px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg-primary) 78%, transparent);
  color: var(--text-secondary);
}

.album-card-title {
  font-size: 0.84rem;
  line-height: 1.5;
}

.album-card-count {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.album-detail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.album-detail-title {
  margin: 0;
  font-size: 1.2rem;
}

.album-detail-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.album-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.album-photo {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg-card);
}

.album-photo-media,
.album-cover-media {
  display: block;
  width: 100%;
  height: 100%;
}

.album-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.album-photo:hover img {
  transform: scale(1.03);
}

.album-gate {
  padding: 34px 24px;
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  text-align: center;
}

.album-gate-title {
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.album-gate-question {
  margin-bottom: 10px;
  font-size: 0.84rem;
}

.album-gate input {
  width: min(260px, 100%);
  margin: 0 auto 10px;
  padding: 7px 12px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  display: block;
}

.album-gate button {
  padding: 6px 20px;
  border: 1px solid var(--text-primary);
  border-radius: 999px;
  background: var(--text-primary);
  color: var(--bg-primary);
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.album-gate-error {
  margin-top: 10px;
  font-size: 0.74rem;
  color: #b4453a;
}

.album-admin {
  margin-top: 34px;
  border-top: 1px dashed var(--border-color);
  padding-top: 14px;
}

.album-admin summary {
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.album-form {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.album-form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.album-form-row label,
.album-form-wide {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 160px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.album-form input,
.album-form select,
.album-form textarea {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.78rem;
}

.album-form-check {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.album-form-bar {
  display: flex;
  justify-content: flex-end;
}

.album-admin-list {
  margin-top: 16px;
  display: grid;
  gap: 6px;
}

.album-del {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .album-photos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
}

/* ===== 相册上传 ===== */
.album-append {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.album-append-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.76rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.album-append-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.album-append-btn input {
  display: none;
}

.album-upload-status {
  margin: 0;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.album-upload-status.is-error {
  color: #b4453a;
}

.album-upload-field input {
  padding: 6px 0;
  border: 0;
  background: none;
  font-size: 0.76rem;
}

/* ===== 相册编辑面板 ===== */
.album-editor {
  margin: 22px 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: color-mix(in srgb, var(--bg-card) 60%, transparent);
}

.album-editor summary {
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.album-edit-form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.album-edit-hint {
  margin: 4px 0 0;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.album-edit-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.album-edit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--bg-primary);
  cursor: default;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.album-edit-row.is-dragging {
  opacity: 0.45;
  border-color: var(--text-primary);
}

.album-drag {
  color: var(--text-muted);
  cursor: grab;
  user-select: none;
}

.album-edit-thumb {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 3px;
  flex: 0 0 auto;
}

.album-edit-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.album-edit-name-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.74rem;
}

.album-edit-name-input::placeholder {
  color: var(--text-muted);
}

.album-cover-pick {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.album-row-del {
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
}

.album-row-del:hover {
  color: #b4453a;
}

/* ===== 赞赏登记 ===== */
.donate-register-tip {
  margin: 14px 0 0;
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
}

.donate-register-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.support-dialog {
  max-width: 360px;
}

.support-form {
  margin-top: 14px;
}

.support-field {
  display: block;
  margin-bottom: 10px;
}

.support-field span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.support-field input,
.support-field textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.78rem;
}

.support-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.support-status {
  margin: 4px 0 8px;
  font-size: 0.74rem;
  color: var(--accent-color);
}

.support-status.is-error {
  color: #b4453a;
}

/* ===== 说说：点赞 / 评论（朋友圈样式） ===== */
.memo-social {
  margin-top: 10px;
}

.memo-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.memo-act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.76rem;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease;
}

.memo-act:hover {
  color: var(--text-primary);
}

.memo-act.is-liked {
  color: var(--accent-color);
}

.memo-act.is-liked svg {
  fill: currentColor;
}

.memo-act.is-popping svg {
  animation: memoPop 0.36s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes memoPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.memo-comments {
  margin: 8px 0 0;
  padding: 8px 12px;
  list-style: none;
  border-radius: 4px;
  background: color-mix(in srgb, var(--bg-card) 62%, transparent);
}

.memo-comment-item {
  font-size: 0.76rem;
  line-height: 1.75;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
  animation: memoCommentIn 0.28s ease both;
}

.memo-comment-author {
  color: var(--text-primary);
}

@keyframes memoCommentIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.memo-comment-form {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: color-mix(in srgb, var(--bg-card) 70%, transparent);
  animation: memoFormIn 0.24s ease both;
}

@keyframes memoFormIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.memo-comment-fields {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.memo-comment-fields input {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.76rem;
}

.memo-comment-form textarea {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.78rem;
  line-height: 1.6;
  resize: vertical;
}

.memo-comment-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.memo-emoji-toggle {
  display: inline-flex;
  padding: 2px;
  border: 0;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}

.memo-emoji-toggle:hover {
  color: var(--text-primary);
}

.memo-comment-send {
  padding: 5px 16px;
  border: 1px solid var(--text-primary);
  border-radius: 999px;
  background: var(--text-primary);
  color: var(--bg-primary);
  font-family: inherit;
  font-size: 0.74rem;
  cursor: pointer;
}

.memo-comment-send:disabled {
  opacity: 0.6;
  cursor: default;
}

.memo-emoji-panel {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 2px;
  max-height: 190px;
  overflow-y: auto;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
  scrollbar-width: thin;
}

.memo-emoji {
  padding: 3px 0;
  border: 0;
  border-radius: 3px;
  background: none;
  font-size: 1.05rem;
  line-height: 1.4;
  cursor: pointer;
}

.memo-emoji:hover {
  background: var(--accent-soft);
}

/* ===== 文章底部：点赞与签名 ===== */
.post-sign-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 34px 0 26px;
}

.post-like-form {
  display: inline-flex;
}

.post-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease;
}

.post-like-btn:hover {
  color: var(--accent-color);
  transform: translateY(-1px);
}

.post-like-btn svg {
  display: block;
}

.post-like-count {
  font-variant-numeric: tabular-nums;
}

.post-signature {
  font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", "Apple Chancery", cursive;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  transform: rotate(-3deg);
  user-select: none;
}

/* ===== 抖音播放器尺寸：保持 360×640 渲染，只做 0.5 倍视觉缩放 ===== */
.dy-embed {
  width: 180px !important;
  margin: 1.2em auto !important;
}

.dy-embed .dy-embed-size {
  width: 360px !important;
  max-width: none !important;
  transform: scale(0.5);
  transform-origin: top left;
  margin-bottom: -320px !important;
}

/* ===== 打字机主题：Special Elite（Ribbon）===== */
@font-face {
  font-family: "Ribbon";
  src: url("assets/fonts/SpecialElite-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

html[data-ink="1"] body,
html[data-ink="1"] .site-brand,
html[data-ink="1"] .site-title,
html[data-ink="1"] .nav-link,
html[data-ink="1"] .nav-link-text,
html[data-ink="1"] .post-card-title,
html[data-ink="1"] .page-title-heading,
html[data-ink="1"] .article-title,
html[data-ink="1"] .album-card-title,
html[data-ink="1"] .album-detail-title,
html[data-ink="1"] .memo-author-name,
html[data-ink="1"] .modal-title,
html[data-ink="1"] h1,
html[data-ink="1"] h2,
html[data-ink="1"] h3,
html[data-ink="1"] h4,
html[data-ink="1"] .entry-content h1,
html[data-ink="1"] .entry-content h2,
html[data-ink="1"] .entry-content h3 {
  font-family: "Ribbon", "STFangsong", "FangSong", "FangSong_GB2312", "Songti SC", "STSong", "SimSun", serif;
}

html[data-ink="1"] body {
  letter-spacing: 0.02em;
}

/* 色带压印：正文与标题走 SVG 滤镜，照片/代码/控件不受影响 */
html[data-ink="1"] .site-brand,
html[data-ink="1"] .nav-link,
html[data-ink="1"] .nav-link-text,
html[data-ink="1"] .post-card-meta,
html[data-ink="1"] .article-meta,
html[data-ink="1"] .read-more-link,
html[data-ink="1"] .memo-time,
html[data-ink="1"] .memo-author-name,
html[data-ink="1"] .page-title-description,
html[data-ink="1"] .site-footer,
html[data-ink="1"] .site-footer p,
html[data-ink="1"] .theme-option-name,
html[data-ink="1"] .modal-subtitle,
html[data-ink="1"] .memo-compose-input::placeholder {
  font-family: "Ribbon", "STFangsong", "FangSong", "FangSong_GB2312", "Songti SC", "STSong", "SimSun", serif;
}



html[data-ink="1"] :is(
  p, li, h1, h2, h3, h4, h5, h6, blockquote, figcaption, time, dt, dd,
  .page-title-eyebrow, .page-title-heading, .page-title-description,
  .records-meta-line, .records-about-btn, .tv-title, .tv-serial, .tv-date,
  .link-title, .link-desc,
  .about-profile-label, .about-profile-text, .about-action-link,
  .about-stat-label, .about-stat-value,
  .modal-title, .modal-subtitle, .comment-form-head, .comment-title,
  .comment-body, .memo-author-name, .memo-time, .video-embed-fallback,
  .post-card-title, .post-card-excerpt, .post-card-meta, .read-more-link,
  .article-title, .album-card-title, .album-detail-title, .site-footer,
  .site-brand, .nav-link:not(.current), .theme-option-name
):not(:has(img, video, iframe, svg, canvas)):not(.sticker-emoji):not(.memo-emoji) {
  filter: url(#ribbon-strike-soft);
  text-shadow:
    0.25px 0.13px 0 rgba(24, 23, 19, 0.38),
    0.48px 0.23px 0 rgba(24, 23, 19, 0.11);
}

/* 评论/说说输入框：用只抖动不挖空的滤镜，输入时也有打字机感但不会糊 */
html[data-ink="1"] .comment-form textarea,
html[data-ink="1"] .memo-compose-input {
  filter: url(#ribbon-strike-typing);
}

/* 评论框：占位符给一点墨感 */
html[data-ink="1"] .comment-form textarea::placeholder,
html[data-ink="1"] .memo-compose-input::placeholder {
  color: rgba(24, 23, 19, 0.55);
  text-shadow: 0.3px 0.15px 0 rgba(24, 23, 19, 0.22);
}

/* 反白文字：用只做位移的滤镜，边缘有毛糙但不会被挖空 */
html[data-ink="1"] .tv-banner,
html[data-ink="1"] .nav-link.current,
html[data-ink="1"] .memo-compose-submit,
html[data-ink="1"] .modal-primary-btn,
html[data-ink="1"] .memo-compose-submit {
  filter: url(#ribbon-strike-invert) !important;
  text-shadow: 0.4px 0.2px 0 rgba(243, 238, 223, 0.28);
}

/* 登录/弹窗内的文字 */
html[data-ink="1"] .modal-dialog .modal-title,
html[data-ink="1"] .modal-dialog h3 {
  filter: url(#ribbon-strike) !important;
  text-shadow:
    0.32px 0.16px 0 rgba(24, 23, 19, 0.47),
    0.58px 0.28px 0 rgba(24, 23, 19, 0.13) !important;
}

html[data-ink="1"] .modal-dialog .modal-subtitle,
html[data-ink="1"] .login-remember label,
html[data-ink="1"] .modal-dialog p {
  filter: url(#ribbon-strike-soft) !important;
  text-shadow:
    0.3px 0.15px 0 rgba(24, 23, 19, 0.42),
    0.55px 0.27px 0 rgba(24, 23, 19, 0.12) !important;
}

html[data-ink="1"] .modal-dialog input::placeholder {
  color: rgba(24, 23, 19, 0.5);
  text-shadow: 0.3px 0.15px 0 rgba(24, 23, 19, 0.22);
}

/* 左下角 LOGO（SVG mask）也给一点压印感 */
html[data-ink="1"] .sidebar-logo,
html[data-ink="1"] .site-branding {
  filter: url(#ribbon-strike-soft);
}

/* 全屏菜单里的文字也走打字机压印 */
html[data-ink="1"] .mobile-drawer-title,
html[data-ink="1"] .mobile-drawer-links a,
html[data-ink="1"] .mobile-drawer-links button {
  filter: url(#ribbon-strike-soft);
  text-shadow:
    0.25px 0.13px 0 rgba(24, 23, 19, 0.38),
    0.48px 0.23px 0 rgba(24, 23, 19, 0.11);
}

/* 打字机字体系：导航下划线加粗，避免被“缺墨”滤镜吃掉 */
html[data-ink="1"] .site-nav .nav-link:not(.current) {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--text-primary);
  text-underline-offset: 7px;
}

html[data-ink="1"] .site-nav .nav-link:not(.current):hover {
  text-decoration-color: transparent;
}

html[data-ink="1"] .mobile-drawer a.current {
  text-decoration-thickness: 2px;
  text-decoration-color: var(--text-primary);
  text-underline-offset: 6px;
}

/* 标题类用更强的压印 */
html[data-ink="1"] :is(
  .post-card-title, .page-title-heading, .article-title,
  .tv-title, .link-title, .album-detail-title, .album-card-title,
  .about-profile-text, .modal-title, h1, h2, h3, h4
) {
  filter: url(#ribbon-strike) !important;
  text-shadow:
    0.32px 0.16px 0 rgba(24, 23, 19, 0.47),
    0.58px 0.28px 0 rgba(24, 23, 19, 0.13) !important;
}

/* 补漏：卡片分类、文章元信息、评论计数、点赞/评论数、页脚分隔等 */
html[data-ink="1"] :is(
  .post-card-category, .single-article-meta, .article-meta, .post-card-meta,
  .comment-count, .comment-count-num, .comment-count-dot, .comments-title,
  .memo-like-count, .memo-comment-count, .post-like-count, .memo-sign-row,
  .site-footer-sep, .read-more-link, .page-title-eyebrow
) {
  filter: url(#ribbon-strike-soft);
  text-shadow:
    0.25px 0.13px 0 rgba(24, 23, 19, 0.38),
    0.48px 0.23px 0 rgba(24, 23, 19, 0.11);
}

/* 归档筛选、订阅卡片、赞赏弹窗 */
html[data-ink="1"] :is(
  .archive-filter-label, .archive-chip, .archive-year, .archive-month,
  .archive-count, .archive-list a, .archive-month-list a,
  .feed-card-title, .feed-card-desc, .feed-card-code, .feed-card code,
  .donate-tab, .donate-register-tip, .donate-register-link,
  .thanks-list, .thanks-empty, .about-action-link
) {
  filter: url(#ribbon-strike-soft);
  text-shadow:
    0.25px 0.13px 0 rgba(24, 23, 19, 0.38),
    0.48px 0.23px 0 rgba(24, 23, 19, 0.11);
}

/* 选中（黑底白字）的筛选项：只抖动不挖空 */
html[data-ink="1"] .archive-chip.is-active,
html[data-ink="1"] .donate-tab.is-active {
  filter: url(#ribbon-strike-invert) !important;
}

/* 分页、登录输入框 */
html[data-ink="1"] .pagination-bar a,
html[data-ink="1"] .pagination-bar .disabled,
html[data-ink="1"] .pagination-bar .pagination-status,
html[data-ink="1"] .pagination-bar span {
  filter: url(#ribbon-strike-soft);
  text-shadow:
    0.25px 0.13px 0 rgba(24, 23, 19, 0.38),
    0.48px 0.23px 0 rgba(24, 23, 19, 0.11);
}

/* 输入框空着时（显示占位符）才上压印，开始输入后恢复清晰 */
html[data-ink="1"] .modal-dialog input:placeholder-shown {
  filter: url(#ribbon-strike-soft);
}

html[data-ink="1"] .entry-media {
  margin: 1.2em 0;
}

html[data-ink="1"] .entry-media img {
  max-width: 100%;
  height: auto;
}

html[data-ink="1"] .ribbon-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}



/* ===== 字体策略：正文用系统宋体，标题/导航用京华老宋体（按需加载子集） ===== */
.site-brand,
.site-title,
.nav-link,
.site-nav .nav-link-text,
.post-card-title,
.page-title-heading,
.article-title,
.album-card-title,
.album-detail-title,
.memo-author-name,
.modal-title,
h1, h2, h3, h4,
.entry-content h1,
.entry-content h2,
.entry-content h3 {
  font-family: "OldSong", "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
}

/* ===== 正文图片灯箱 ===== */
html.is-lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 36px 24px 92px;
  background: rgba(12, 14, 14, 0.72);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.lightbox-image {
  max-width: 94vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  cursor: default;
  opacity: 0;
  transform: scale(0.94) translateY(6px);
  transition:
    opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox.is-open .lightbox-image {
  opacity: 1;
  transform: scale(1) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox-image {
    transition: none;
  }
}

.lightbox-bar {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.09);
  color: #ece8de;
  font-size: 0.82rem;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-count {
  min-width: 42px;
  color: rgba(255, 255, 255, 0.72);
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.lightbox-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.15rem;
  line-height: 1;
  padding: 3px 9px;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.lightbox-btn:disabled {
  opacity: 0.3;
  cursor: default;
  background: transparent;
}

.lightbox-close {
  font-size: 1.25rem;
  margin-left: 6px;
}

.lightbox-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 120px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.lightbox-arrow:hover {
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-50%) scale(1.06);
}

.lightbox-arrow svg {
  display: block;
}

.lightbox-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

.lightbox-arrow-prev {
  left: 18px;
}

.lightbox-arrow-next {
  right: 18px;
}

@media (max-width: 640px) {
  .lightbox-arrow {
    width: 44px;
    height: 72px;
  }

  .lightbox-arrow svg {
    width: 34px;
    height: 34px;
  }

  .lightbox-arrow-prev {
    left: 4px;
  }

  .lightbox-arrow-next {
    right: 4px;
  }
}

.lightbox-caption {
  max-width: 42vw;
  margin-right: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.72);
}

.lightbox-caption:empty {
  display: none;
}

.lightbox-original {
  margin-right: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lightbox-original:hover {
  color: #ffffff;
}

.lightbox-original[hidden] {
  display: none;
}

/* ===== 正文图片灯箱 ===== */
html.is-lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 36px 24px 92px;
  background: rgba(12, 14, 14, 0.72);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.lightbox-image {
  max-width: 94vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  cursor: default;
  opacity: 0;
  transform: scale(0.94) translateY(6px);
  transition:
    opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox.is-open .lightbox-image {
  opacity: 1;
  transform: scale(1) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox-image {
    transition: none;
  }
}

.lightbox-bar {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.09);
  color: #ece8de;
  font-size: 0.82rem;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-count {
  min-width: 42px;
  color: rgba(255, 255, 255, 0.72);
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.lightbox-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.15rem;
  line-height: 1;
  padding: 3px 9px;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.lightbox-btn:disabled {
  opacity: 0.3;
  cursor: default;
  background: transparent;
}

.lightbox-close {
  font-size: 1.25rem;
  margin-left: 6px;
}

.lightbox-original {
  margin-right: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lightbox-original:hover {
  color: #ffffff;
}

.lightbox-original[hidden] {
  display: none;
}

/* ===== 主题切换：从点击处扩散的圆形揭示 ===== */
html.theme-reveal::view-transition-old(root) {
  animation: none;
  z-index: 1;
}

html.theme-reveal::view-transition-new(root) {
  animation: none;
  z-index: 2;
}

/* ===== 页面切换：正文淡入 + 8px 上移（导航与页脚静止） ===== */
@view-transition {
  navigation: auto;
}

.site-main {
  view-transition-name: content;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
}

::view-transition-group(content) {
  animation: none;
}

::view-transition-old(content) {
  animation: pageFadeOut 140ms ease both;
}

::view-transition-new(content) {
  animation: pageFadeIn 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pageFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* 不支持 View Transition 的浏览器：首次进入时淡入 */
html:not(.vt-enabled) .site-main {
  animation: pageFadeIn 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .site-main,
  ::view-transition-old(content),
  ::view-transition-new(content) {
    animation: none !important;
  }
}

/* ===== 页面标题（对齐参考站 page-title-header） ===== */
.page-title-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 28px;
  padding: 0;
  border: 0;
}

.page-title-eyebrow {
  margin: 0;
  color: var(--text-muted);
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-title-heading {
  margin: 0;
  font-size: 1.34rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.page-title-description {
  max-width: 58ch;
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.75;
}

/* ===== 动态 / 记录：卡片流 ===== */
.memos-page {
  max-width: none;
}

.memos-top {
  margin-bottom: 30px;
}

.memo-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 24px;
}

.memo-item {
  position: relative;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 14px;
}

.memo-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.memo-avatar-shell {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.memo-avatar {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 6px;
  object-fit: cover;
}

.memo-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.memo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.memo-author-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
}

.memo-author-name {
  font-size: 0.92rem;
  line-height: 1.35;
}

.memo-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.memo-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.5;
}

.memo-title a {
  text-decoration: none;
}

.memo-title a:hover {
  color: var(--bg-primary);
  background: var(--text-primary);
}

.memo-content {
  margin: 0;
  font-size: inherit;
  line-height: 1.82;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.memo-content p {
  margin: 0 0 6px;
}

.memo-content p:last-child {
  margin-bottom: 0;
}

.memo-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.memo-photos-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 86px);
  gap: 6px;
  max-width: 270px;
}

.memo-photo-link {
  display: block;
  width: 86px;
  height: 86px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg-secondary);
}

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

.memo-photos-grid.count-1 {
  display: block;
  max-width: min(100%, 320px);
}

.memo-photos-grid.count-1 .memo-photo-link {
  width: auto;
  max-width: 100%;
  height: 200px;
  background: transparent;
}

.memo-photos-grid.count-1 .memo-photo-link img {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}

.no-memos {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== 说说发布框 / 票根录入框 ===== */
.memo-compose,
.ticket-compose {
  border: 1px solid var(--panel-border-soft);
  border-radius: 3px;
  background: var(--panel-bg-subtle);
  padding: 14px 16px;
  margin-bottom: 26px;
}

.memo-compose-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.8;
  resize: vertical;
  min-height: 56px;
  outline: none;
}

.memo-compose-bar,
.ticket-compose-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}

.memo-compose-hint,
.ticket-compose-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.memo-compose-submit {
  padding: 6px 16px;
  border: 1px solid var(--text-primary);
  background: var(--text-primary);
  color: var(--bg-primary);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  border-radius: 2px;
  transition: opacity 0.18s ease;
}

.memo-compose-submit:hover {
  opacity: 0.85;
}

/* 删除按钮（仅登录可见，悬停出现） */
.memo-delete-form {
  margin-left: auto;
}

.memo-delete-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.memo-item:hover .memo-delete-btn,
.memo-item:focus-within .memo-delete-btn,
.tv-item:hover .memo-delete-btn,
.tv-item:focus-within .memo-delete-btn {
  opacity: 1;
}

.memo-delete-btn:hover {
  color: #b4453a;
}

/* 分页条 */
.pager-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 26px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pager-bar a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.pager-bar a:hover {
  color: var(--bg-primary);
  background: var(--text-primary);
}

.pager-bar .is-disabled {
  color: var(--text-muted);
  opacity: 0.45;
}

.pager-state {
  font-variant-numeric: tabular-nums;
}

/* ===== 旅行足迹票根 ===== */
.tv-output {
  padding: 4px 0 6px;
}

.tv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tv-item {
  position: relative;
  min-width: 0;
}

.tv-ticket {
  --tv-line: color-mix(in srgb, var(--text-primary) 34%, transparent);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px 14px 0;
  border: 1px dashed var(--tv-line);
  color: var(--text-primary);
}

.tv-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.tv-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tv-serial {
  flex: 0 0 auto;
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.tv-en {
  margin: 1px 0 0;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tv-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.tv-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.tv-box {
  border: 1px dashed var(--tv-line);
  padding: 3px 8px;
  font-size: 0.68rem;
  line-height: 1.58;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.tv-box p {
  margin: 0;
}

.tv-date {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.tv-stamp {
  width: 48px;
  height: 48px;
  justify-self: center;
  color: var(--tv-line);
}

.tv-stamp svg {
  display: block;
  width: 100%;
  height: 100%;
}

.tv-banner {
  margin: 10px 0 0;
  margin-top: auto;
  padding: 5px 10px;
  background: var(--text-primary);
  color: var(--bg-primary);
  text-align: center;
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv-banner-form {
  margin: 10px 0 0;
  margin-top: auto;
  padding: 0;
}

.tv-banner-input {
  display: block;
  width: 100%;
  padding: 5px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
  text-align: center;
  outline: none;
}

.tv-banner-input::placeholder {
  color: color-mix(in srgb, var(--bg-primary) 58%, transparent);
}

.tv-banner-input:focus {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bg-primary) 42%, transparent);
}

.tv-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 9px;
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
}

.tv-foot span {
  flex: 0 0 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}

.tv-delete-form {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
}

.tv-delete-form .memo-delete-btn {
  padding: 2px 6px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--bg-primary) 72%, transparent);
}

@media (max-width: 720px) {
  .tv-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 票根录入表单 */
.ticket-compose-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}

.ticket-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ticket-field-wide {
  grid-column: span 2;
}

.ticket-field span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.ticket-field input {
  width: 100%;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  padding: 6px 8px;
  border-radius: 2px;
}

.ticket-field input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.records-note {
  margin-top: 34px;
}

/* ===== 记录：标题下方说明行 ===== */
.records-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: -6px 0 22px;
}

.records-meta-line {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.records-about-btn {
  font-size: 0.76rem;
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.records-about-btn:hover {
  color: var(--bg-primary);
  background: var(--text-primary);
}

/* ===== 归档：按年折叠的手账清单 ===== */
.archive-ledger {
  overflow: hidden;
  border: 1px solid var(--panel-border-soft);
  border-radius: 3px;
  background: var(--panel-bg-subtle);
}

.archive-year-group {
  position: relative;
  border: 0;
  margin: 0;
}

.archive-year-group + .archive-year-group::before {
  content: "";
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 1px;
  background: var(--divider-color);
  pointer-events: none;
}

.archive-year-group summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 18px;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.archive-year-group summary::-webkit-details-marker {
  display: none;
}

.archive-year-group summary:hover {
  background: var(--interactive-hover);
}

.archive-year-group[open] summary {
  color: var(--accent-color);
}

.archive-year {
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--text-primary);
}

.archive-count {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.archive-year-list {
  margin: 0;
  padding: 0 18px 14px;
  list-style: none;
}

.archive-year-list li {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--divider-color) 68%, transparent);
}

.archive-year-list li:last-child {
  border-bottom: 0;
}

.archive-year-list time {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.archive-year-list a {
  color: var(--text-primary);
  text-decoration: none;
}

.archive-year-list a:hover {
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 归档筛选 */
.archive-filters {
  display: grid;
  gap: 10px;
  margin: 18px 0 22px;
}

.archive-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.archive-filter-label {
  margin-right: 2px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.archive-chip {
  display: inline-block;
  padding: 3px 11px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.archive-chip:hover {
  border-color: var(--accent-color);
  color: var(--text-primary);
}

.archive-chip.is-active {
  border-color: var(--text-primary);
  background: var(--text-primary);
  color: var(--bg-primary);
}

.archive-chip-sub {
  font-size: 0.68rem;
  border-style: dashed;
}

.archive-month-group + .archive-month-group {
  margin-top: 6px;
}

.archive-month {
  margin: 12px 0 4px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.archive-month-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ===== 邻居：双列友链 ===== */
.link-list-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
}

.link-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 18px 18px 20px;
}

.link-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.link-title {
  display: inline-flex;
  align-items: center;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  padding: 2px 6px;
  margin: -2px -6px;
  text-decoration: none;
}

.link-title:hover {
  color: var(--bg-primary);
  background: var(--text-primary);
}

.link-desc {
  display: block;
  width: 100%;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.7;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.links-intro {
  margin-top: 36px;
}

/* ===== 关于：简介行 + 统计格 ===== */
.about-sheet {
  width: 100%;
}

.about-overview {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: 0 34px;
  align-items: start;
  margin-bottom: 30px;
}

.about-overview-grid {
  display: grid;
  row-gap: 8px;
  align-items: baseline;
}

.about-profile-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-height: 26px;
}

.about-profile-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.about-profile-text {
  color: var(--text-primary);
  font-size: 0.72rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.about-action-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  color: var(--text-primary);
  font-size: 0.72rem;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.about-action-link:hover {
  color: var(--bg-primary);
  background: var(--text-primary);
}

.about-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(4, auto);
  column-gap: 24px;
  row-gap: 8px;
  align-items: baseline;
  justify-items: center;
  text-align: center;
  min-width: 0;
}

.about-stat-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.55;
  min-height: 26px;
}

.about-stat-value {
  color: var(--text-primary);
  font-size: 0.86rem;
  line-height: 1.55;
}

.about-content {
  margin-top: 4px;
}

/* ===== 订阅：RSS 卡片 ===== */
.feed-page {
  max-width: none;
}

.feed-cards {
  overflow: hidden;
  border: 1px solid var(--panel-border-soft);
  border-radius: 3px;
  background: var(--panel-bg-subtle);
}

.feed-card {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 2px 12px;
  padding: 18px 20px;
  color: inherit;
  border-bottom: 1px solid color-mix(in srgb, var(--border-color) 78%, transparent);
  transition: color 0.18s ease, background-color 0.18s ease;
}

.feed-cards > :last-child {
  border-bottom: 0;
}

.feed-card:hover {
  background: var(--interactive-hover);
  color: var(--text-primary);
}

.feed-card-icon {
  display: inline-flex;
  grid-row: 1 / 3;
  align-items: center;
  color: var(--accent-color);
}

.feed-card-title {
  font-size: 1rem;
  font-weight: 700;
}

.feed-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.feed-card-code {
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: baseline;
  gap: 16px;
}

.feed-card-code .feed-card-title {
  font-size: 0.92rem;
}

.feed-card code {
  font-size: 0.82rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
  word-break: break-word;
  user-select: all;
}

@media (max-width: 900px) {
  .site-wrapper {
    display: block;
    width: 100%;
    max-width: none;
    padding: 0 20px;
  }

  .site-header {
    position: static;
    height: auto;
    padding: 18px 0 14px 2px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 26px;
  }

  .header-inner {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .site-branding {
    display: flex;
  }

  .desktop-nav,
  .sidebar-tools,
  .sidebar-profile {
    display: none;
  }

  .mobile-tools {
    display: flex;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .mobile-tools .icon-btn svg {
    width: 16px;
    height: 16px;
  }

  .mobile-menu-toggle svg {
    width: 20px;
    height: 20px;
  }

  /* 页脚文字 -10% */
  .site-footer {
    font-size: 0.63rem;
  }

  .site-footer-right {
    font-size: 0.63rem;
  }

  .site-main {
    padding: 0 0 48px;
  }

  .site-footer {
    display: block;
    padding: 24px 0 34px;
    font-size: 0.7rem;
  }

  .site-footer-tagline {
    margin-bottom: 6px;
  }

  .site-footer-bottom {
    align-items: center;
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .links-grid {
    grid-template-columns: 1fr;
  }
  .comment-profile {
    grid-template-columns: 1fr;
  }

  .comment-item {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
  }

  .comment-avatar {
    width: 32px;
    height: 32px;
  }

  .post-card-excerpt {
    font-size: 0.88rem;
  }

  .link-list-wrap {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .about-overview {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .memo-photos-grid {
    max-width: 100%;
  }

  .mr-list {
    grid-template-columns: 1fr;
  }

  .ticket-compose-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ticket-field-wide {
    grid-column: span 2;
  }

  .site-footer-bottom {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* ===== 移动端四角元素统一缩小 10%（放在最后，覆盖前面的 .site-footer 字号） ===== */
@media (max-width: 900px) {
  .site-footer,
  .site-footer-line,
  .site-footer-tagline,
  .site-footer-meta,
  .site-footer-right,
  .site-footer-right a,
  .site-footer-sep {
    font-size: 0.63rem;
  }
}

/* ===== 移动端：页脚贴底（距底边约 1%） ===== */
@media (max-width: 900px) {
  .site-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .site-main {
    flex: 1 0 auto;
  }

  .site-footer {
    margin-top: auto;
    padding-bottom: 0.5vh;
    padding-bottom: calc(0.5vh + env(safe-area-inset-bottom, 0px) / 2);
  }
}

/* ===== 移动端：顶部状态栏固定 + 半透明毛玻璃 ===== */
@media (max-width: 900px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    margin: 0 -20px 26px;
    padding: 14px 20px 12px;
    background: color-mix(in srgb, var(--bg-primary) 76%, transparent);
    -webkit-backdrop-filter: blur(12px) saturate(1.15);
    backdrop-filter: blur(12px) saturate(1.15);
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 55%, transparent);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  }

  .site-header.is-scrolled {
    background: color-mix(in srgb, var(--bg-primary) 88%, transparent);
    border-bottom-color: color-mix(in srgb, var(--border-color) 80%, transparent);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  }

  /* 不支持毛玻璃时退化为更实的底色，避免文字糊在内容上 */
  @supports not ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
    .site-header {
      background: var(--bg-primary);
    }
  }
}

/* ===== 打字机主题：所有输入框（含说说评论、昵称/邮箱、登录）统一字体与压印 ===== */
html[data-ink="1"] .memo-comment-form input,
html[data-ink="1"] .memo-comment-form textarea,
html[data-ink="1"] .comment-form input,
html[data-ink="1"] .comment-form textarea,
html[data-ink="1"] .comment-editor,
html[data-ink="1"] .memo-compose-input,
html[data-ink="1"] .login-field input,
html[data-ink="1"] .comment-profile input,
html[data-ink="1"] .comment-profile textarea {
  font-family: "Ribbon", "STFangsong", "FangSong", "FangSong_GB2312", "Songti SC", "STSong", "SimSun", serif;
  filter: url(#ribbon-strike-typing);
}

html[data-ink="1"] .memo-comment-form input::placeholder,
html[data-ink="1"] .memo-comment-form textarea::placeholder,
html[data-ink="1"] .comment-form input::placeholder,
html[data-ink="1"] .comment-editor::placeholder,
html[data-ink="1"] .memo-compose-input::placeholder,
html[data-ink="1"] .login-field input::placeholder {
  color: rgba(24, 23, 19, 0.52);
  text-shadow: 0.3px 0.15px 0 rgba(24, 23, 19, 0.22);
}

/* ===== 动效统一：菜单 / 弹窗 丝滑过渡（只用 opacity + transform，走合成层） ===== */
.modal-backdrop {
  opacity: 0;
  visibility: hidden;
  background: rgba(20, 18, 15, 0.46);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  will-change: opacity;
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.3s;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-dialog {
  opacity: 0;
  -webkit-transform: translateY(36px) translateZ(0);
  transform: translateY(36px) translateZ(0);
  will-change: transform, opacity;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.46s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-dialog {
  opacity: 1;
  -webkit-transform: translateY(0) translateZ(0);
  transform: translateY(0) translateZ(0);
}

@media (max-width: 640px) {
  .theme-dialog {
    -webkit-transform: translateY(36px) translateZ(0);
    transform: translateY(36px) translateZ(0);
    transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.46s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .modal-backdrop.active .theme-dialog {
    -webkit-transform: translateY(0) translateZ(0);
    transform: translateY(0) translateZ(0);
  }
}

.mobile-drawer {
  opacity: 1;
  visibility: hidden;
  transform: translateY(100%);
  will-change: transform;
  transition: transform 0.46s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.46s;
}

.mobile-drawer.open {
  visibility: visible;
  transform: translateY(0);
  transition: transform 0.46s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 菜单内容：随面板一起上浮淡入（单组，不分段） */
.mobile-drawer-head,
.mobile-drawer-links > * {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1) 0.08s,
    transform 0.42s cubic-bezier(0.16, 1, 0.3, 1) 0.08s;
}

.mobile-drawer.open .mobile-drawer-head,
.mobile-drawer.open .mobile-drawer-links > * {
  opacity: 1;
  transform: translateY(0);
}

.mobile-drawer:not(.open) .mobile-drawer-head,
.mobile-drawer:not(.open) .mobile-drawer-links > * {
  transition: opacity 0.18s ease, transform 0.18s ease;
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop,
  .modal-dialog,
  .theme-dialog,
  .mobile-drawer {
    transition: none;
    transform: none;
  }
}

/* 浮层打开时只加深顶栏底色，不摘掉毛玻璃（摘掉会触发整页重绘 → 闪屏） */
html.overlay-open .site-header {
  background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
}

/* ===== 主题弹窗：卡片依次浮现（只动 opacity / transform，不触发重绘） ===== */
.theme-grid .theme-option-btn {
  opacity: 0;
  -webkit-transform: translateY(10px);
  transform: translateY(10px);
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .theme-grid .theme-option-btn {
  opacity: 1;
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

.modal-backdrop.active .theme-grid .theme-option-btn:nth-child(1) { transition-delay: 0.08s; }
.modal-backdrop.active .theme-grid .theme-option-btn:nth-child(2) { transition-delay: 0.12s; }
.modal-backdrop.active .theme-grid .theme-option-btn:nth-child(3) { transition-delay: 0.16s; }
.modal-backdrop.active .theme-grid .theme-option-btn:nth-child(4) { transition-delay: 0.2s; }
.modal-backdrop.active .theme-grid .theme-option-btn:nth-child(5) { transition-delay: 0.24s; }
.modal-backdrop.active .theme-grid .theme-option-btn:nth-child(6) { transition-delay: 0.28s; }

@media (prefers-reduced-motion: reduce) {
  .theme-grid .theme-option-btn {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== 参照 Codrops「Modal Window Effects」的两个动效 ===== */

/* Effect 12「Just Me」：用于全屏菜单 —— 整体从 0.8 缩放淡入 */
.mobile-drawer {
  opacity: 0;
  visibility: hidden;
  -webkit-transform: scale(0.8);
  transform: scale(0.8);
  -webkit-transform-origin: 50% 50%;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    -webkit-transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.3s;
}

.mobile-drawer.open {
  opacity: 1;
  visibility: visible;
  -webkit-transform: scale(1);
  transform: scale(1);
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    -webkit-transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 菜单内容跟随整体缩放，不再单独做动画 */
.mobile-drawer-head,
.mobile-drawer-links > * {
  opacity: 1;
  transform: none;
  transition: none;
}

/* Effect 1「Fade in & Scale」：用于主题弹窗 —— 0.7 缩放 + 淡入 */
.modal-dialog {
  opacity: 0;
  -webkit-transform: scale(0.7);
  transform: scale(0.7);
  -webkit-transform-origin: 50% 50%;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    -webkit-transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-backdrop.active .modal-dialog {
  opacity: 1;
  -webkit-transform: scale(1);
  transform: scale(1);
}

@media (max-width: 640px) {
  .theme-dialog {
    -webkit-transform: scale(0.7);
    transform: scale(0.7);
  }

  .modal-backdrop.active .theme-dialog {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

/* 卡片不再单独延迟，跟随弹窗整体缩放 */
.theme-grid .theme-option-btn {
  opacity: 1;
  -webkit-transform: none;
  transform: none;
  transition: none;
}

/* 「Just Me」落到菜单上：背景淡入 + 内容缩放（与 Codrops 的 overlay + content 结构一致） */
.mobile-drawer {
  opacity: 0;
  visibility: hidden;
  -webkit-transform: none;
  transform: none;
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.3s;
}

.mobile-drawer.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-drawer-head,
.mobile-drawer-links {
  opacity: 0;
  -webkit-transform: scale(0.8);
  transform: scale(0.8);
  -webkit-transform-origin: 50% 50%;
  transform-origin: 50% 50%;
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1) 0.04s,
    -webkit-transform 0.34s cubic-bezier(0.16, 1, 0.3, 1) 0.04s,
    transform 0.34s cubic-bezier(0.16, 1, 0.3, 1) 0.04s;
}

.mobile-drawer.open .mobile-drawer-head,
.mobile-drawer.open .mobile-drawer-links {
  opacity: 1;
  -webkit-transform: scale(1);
  transform: scale(1);
}

.mobile-drawer-links > * {
  opacity: 1;
  -webkit-transform: none;
  transform: none;
  transition: none;
}

/* 动画期间临时摘掉 SVG 压印：缩放滤镜文字会让 iOS 重新栅格化 → 闪烁 */
.is-animating .mobile-drawer-title,
.is-animating .mobile-drawer-links a,
.is-animating .mobile-drawer-links button,
.is-animating .modal-title,
.is-animating .modal-subtitle,
.is-animating .modal-dialog p,
.is-animating .modal-dialog h3,
.is-animating .theme-option-name,
.is-animating .theme-option-btn {
  filter: none !important;
  text-shadow: none !important;
}

/* ===== 抖音「后台全屏、前端裁切」画框（与 DouyinCrop 插件同款） ===== */
.dy-crop-wrapper {
  position: relative;
  width: 100%;
  margin: 1.4em auto;
  overflow: hidden;
  border-radius: 12px;
  background-color: #000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.dy-crop-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.dy-crop-inner iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: 0;
  transform-origin: center center;
}

.dy-crop-fallback {
  display: block;
  margin-top: 6px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dy-crop-fallback:hover {
  color: var(--text-primary);
}

/* ===== 说说：位置标签（发布框 + 列表展示） ===== */
.memo-location-field {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: text;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.memo-location-field:focus-within {
  border-color: var(--accent-color);
  color: var(--text-secondary);
}

.memo-location-field input {
  width: 8.5em;
  max-width: 42vw;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  outline: none;
  padding: 0;
}

.memo-location-field input::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

.memo-location {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.memo-location svg {
  opacity: 0.8;
  flex: none;
}

@media (max-width: 640px) {
  .memo-location-field input {
    width: 6.5em;
  }

  .memo-location {
    margin-left: 6px;
    font-size: 0.74rem;
  }
}

/* 移动端主题弹窗：改为丝滑淡入（不缩放） */
@media (max-width: 640px) {
  .theme-dialog,
  .modal-backdrop.active .theme-dialog {
    -webkit-transform: none;
    transform: none;
  }

  .theme-dialog {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .modal-backdrop.active .theme-dialog {
    opacity: 1;
  }
}

/* ===== 说说位置：地图选择弹窗 ===== */
.memo-location-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.78rem;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.memo-location-field:focus-within {
  border-color: var(--accent-color);
  color: var(--text-secondary);
}

.memo-location-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.memo-location-pick:hover {
  background: var(--accent-soft);
  color: var(--text-primary);
}

.loc-dialog {
  max-width: 560px;
  width: 100%;
}

.loc-search {
  display: flex;
  gap: 8px;
  margin: 4px 0 10px;
}

.loc-search input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.86rem;
}

.loc-search button {
  padding: 9px 16px;
  border: 1px solid var(--text-primary);
  border-radius: 6px;
  background: var(--text-primary);
  color: var(--bg-primary);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}

.loc-results {
  max-height: 168px;
  overflow-y: auto;
  margin-bottom: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}

.loc-result {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
}

.loc-result:last-child {
  border-bottom: 0;
}

.loc-result:hover {
  background: var(--accent-soft);
  color: var(--text-primary);
}

.loc-result-empty {
  padding: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.loc-map {
  height: 300px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.loc-map .leaflet-control-attribution {
  font-size: 10px;
  opacity: 0.75;
}

.loc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.loc-current {
  min-width: 0;
  flex: 1;
  font-size: 0.8rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loc-current.is-empty {
  color: var(--text-muted);
}

.loc-actions {
  display: flex;
  gap: 8px;
  flex: none;
}

.loc-btn {
  padding: 7px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.loc-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.loc-btn-primary {
  border-color: var(--text-primary);
  background: var(--text-primary);
  color: var(--bg-primary);
}

.loc-btn-primary:hover {
  color: var(--bg-primary);
  opacity: 0.88;
}

@media (max-width: 640px) {
  .loc-dialog {
    max-height: 86vh;
    overflow-y: auto;
  }

  .loc-map {
    height: 44vh;
  }

  .loc-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .loc-actions {
    justify-content: flex-end;
  }
}

/* 位置弹窗：我的位置按钮 + 提示 */
.loc-locate {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.82rem;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.loc-locate:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.loc-hint {
  margin: -2px 0 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .loc-locate span {
    display: none;
  }

  .loc-locate {
    padding: 9px 10px;
  }
}

/* ===== 相册密码：胶囊式输入（复刻参考视频的形变动效） ===== */
.album-code .code-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 168px;
  height: 46px;
  margin: 4px auto 0;
  border: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
  border-radius: 999px;
  background: var(--bg-card);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: width 0.46s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.album-code.is-open .code-pill {
  width: 220px;
  border-color: var(--accent-color);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
}

.album-code .code-open {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.2s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.album-code.is-open .code-open {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

.album-code .code-open svg {
  opacity: 0.75;
}

.album-code .code-field {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 16px;
  opacity: 0;
  transform: scale(0.94);
  pointer-events: none;
  transition: opacity 0.26s ease 0.06s, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.06s;
}

.album-code.is-open .code-field {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.album-code .code-dots {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
  height: 100%;
}

.album-code .code-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.28;
  animation: codeDotIn 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.album-code .code-dot.is-filled {
  opacity: 1;
  background: var(--text-primary);
}

.album-code .code-dot.is-empty {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--border-color);
  opacity: 1;
}

@keyframes codeDotIn {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); }
}

.album-code .code-field input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0 44px 0 16px;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font: inherit;
  outline: none;
}

.album-code .code-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  box-sizing: border-box;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--bg-primary);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.album-code.has-value .code-submit {
  opacity: 1;
  transform: scale(1);
}

.album-gate.is-shaking .code-pill {
  animation: codeShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes codeShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .album-code .code-pill,
  .album-code .code-open,
  .album-code .code-field,
  .album-code .code-submit,
  .album-code .code-dot,
  .album-gate.is-shaking .code-pill {
    transition: none;
    animation: none;
  }
}

/* 归档筛选：分类 / 年份 胶囊标签（默认样式） */


/* ===== 归档筛选：滑动高亮块（active-box-filter） ===== */
.archive-filter-row {
  position: relative;
}

.archive-filters .archive-chip {
  position: relative;
  z-index: 2;
  background: transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.archive-chip.is-active {
  background: transparent;
  color: var(--bg-primary);
  border-color: transparent;
}

.active-box-filter.is-off {
  opacity: 0;
  pointer-events: none;
}

.active-box-filter {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  z-index: 1;
  border-radius: 999px;
  background: var(--text-primary);
  pointer-events: none;
  will-change: transform, width, height, opacity;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease;
}

@media (prefers-reduced-motion: reduce) {
  .active-box-filter {
    transition: none;
  }
}

/* ===== 归档分类：折叠 / 展开 ===== */
.archive-chips-more {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.14s cubic-bezier(0.32, 0, 0.24, 1), opacity 0.12s ease;
}

.archive-chips-more.is-open {
  opacity: 1;
}

/* 动画期间临时卸掉压印滤镜：移动端 SVG 滤镜逐帧重栅格化会明显拖慢 */
html[data-ink="1"] .archive-chips-more.is-animating .archive-chip,
html[data-ink="1"] .archive-chips-more.is-animating .archive-chip * {
  filter: none !important;
  text-shadow: none !important;
}

@media (max-width: 640px) {
  .archive-chips-more {
    transition: max-height 0.12s cubic-bezier(0.32, 0, 0.24, 1), opacity 0.1s ease;
  }
}

.archive-chips-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  margin-left: 2px;
  border: 1px dashed var(--border-color);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.archive-chips-toggle.has-active::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-primary);
}

.archive-chips-toggle {
  position: relative;
}

.archive-chips-toggle.is-open {
  border-style: solid;
  border-color: var(--border-color);
  background: color-mix(in srgb, var(--text-primary) 6%, transparent);
}

.archive-chips-toggle:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.archive-chips-toggle svg {
  transition: transform 0.2s cubic-bezier(0.32, 0, 0.24, 1);
}

.archive-chips-toggle.is-open svg {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .archive-chips-more,
  .archive-chips-toggle svg {
    transition: none;
  }
}

@media (max-width: 640px) {
  /* 手机上放大点击热区，点起来更跟手 */
  .archive-chips-toggle {
    width: 34px;
    height: 34px;
  }

  .archive-chips-toggle svg {
    width: 15px;
    height: 15px;
  }
}

/* ===== 折叠分类：逐个淡入 ===== */
.archive-chips-more .archive-chip {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.24s cubic-bezier(0.32, 0, 0.24, 1),
    border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.archive-chips-more.is-open .archive-chip {
  opacity: 1;
  transform: translateY(0);
}

.archive-chips-more.is-open .archive-chip:nth-child(1) { transition-delay: 0ms, 0ms; }
.archive-chips-more.is-open .archive-chip:nth-child(2) { transition-delay: 14ms, 14ms; }
.archive-chips-more.is-open .archive-chip:nth-child(3) { transition-delay: 28ms, 28ms; }
.archive-chips-more.is-open .archive-chip:nth-child(4) { transition-delay: 42ms, 42ms; }
.archive-chips-more.is-open .archive-chip:nth-child(5) { transition-delay: 56ms, 56ms; }
.archive-chips-more.is-open .archive-chip:nth-child(n+6) { transition-delay: 70ms, 70ms; }

/* 淡蓝 logo（移动端顶部 / 桌面左下角） */
:root {
  --logo-blue: #1d3d6c;
}

/* 夜间主题：logo 用截图里的浅雾蓝 */
html[data-theme="night"] {
  --logo-blue: #aec6f5;
}

/* ===== 主题弹窗：快速淡入 + 轻微放大（对齐参考视频的手感） ===== */
.modal-backdrop {
  transition: opacity 0.14s ease-out, visibility 0s linear 0.16s;
}

.modal-backdrop.active {
  transition: opacity 0.14s ease-out;
}

.modal-dialog,
.theme-dialog {
  opacity: 0;
  -webkit-transform: scale(0.96) translateZ(0);
  transform: scale(0.96) translateZ(0);
  -webkit-transform-origin: 50% 50%;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  transition: opacity 0.14s ease-out,
    -webkit-transform 0.17s cubic-bezier(0.2, 0, 0.2, 1),
    transform 0.17s cubic-bezier(0.2, 0, 0.2, 1);
}

.modal-backdrop.active .modal-dialog,
.modal-backdrop.active .theme-dialog {
  opacity: 1;
  -webkit-transform: scale(1) translateZ(0);
  transform: scale(1) translateZ(0);
}

/* 主题卡片：去掉 0.08–0.28s 的排队延迟，改为几乎同时淡入 */
.theme-grid .theme-option-btn {
  opacity: 0;
  -webkit-transform: translateY(6px);
  transform: translateY(6px);
  transition: opacity 0.12s ease-out, transform 0.15s cubic-bezier(0.2, 0, 0.2, 1);
}

.modal-backdrop.active .theme-grid .theme-option-btn {
  opacity: 1;
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

.modal-backdrop.active .theme-grid .theme-option-btn:nth-child(n) {
  transition-delay: 0s;
}

@media (max-width: 640px) {
  .theme-dialog {
    -webkit-transform: scale(0.96) translateZ(0);
    transform: scale(0.96) translateZ(0);
  }

  .modal-backdrop.active .theme-dialog {
    -webkit-transform: scale(1) translateZ(0);
    transform: scale(1) translateZ(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal-dialog,
  .theme-dialog,
  .modal-backdrop {
    transition: none;
    transform: none;
  }
}

/* ===== 主题弹窗：Progressive Blur 多窗口样式（参考 17sucai #61748） ===== */
#theme-modal {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#theme-modal .shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  opacity: 0;
  transition: opacity 0.34s ease;
  pointer-events: none;
}

#theme-modal.active .shade {
  opacity: 1;
}

/* 8 层递进模糊：越靠近弹窗越糊，越远越清晰 */
#theme-modal .gradient-blur {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: color-mix(in srgb, var(--bg-primary) 38%, transparent);
  opacity: 0;
  transition: opacity 0.34s ease;
}

#theme-modal.active .gradient-blur {
  opacity: 1;
}

#theme-modal .gradient-blur > div {
  position: absolute;
  inset: 0;
}

#theme-modal .gradient-blur > div {
  display: none;
}

#theme-modal .gradient-blur > div:nth-child(1) {
  display: block;
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  -webkit-mask: none;
  mask: none;
}

/* 卡片本体：底部上浮 + 轻微放大，圆角更大 */
#theme-modal .theme-dialog {
  position: relative;
  z-index: 3;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--border-color) 60%, transparent);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28), 0 6px 18px rgba(0, 0, 0, 0.12);
  opacity: 0;
  -webkit-transform: translateY(34px) scale(0.97);
  transform: translateY(34px) scale(0.97);
  transition: opacity 0.26s ease, -webkit-transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#theme-modal.active .theme-dialog {
  opacity: 1;
  -webkit-transform: translateY(0) scale(1);
  transform: translateY(0) scale(1);
}

@media (max-width: 640px) {
  #theme-modal .gradient-blur > div:nth-child(7),
  #theme-modal .gradient-blur > div:nth-child(8) {
    display: none;
  }

  #theme-modal .theme-dialog {
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #theme-modal .theme-dialog,
  #theme-modal .shade,
  #theme-modal .gradient-blur {
    transition: none;
  }
}

/* ===== 主题弹窗：从按钮位置长出（FLIP） ===== */
#theme-modal .theme-dialog {
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  transition: opacity 0.2s ease,
    transform 0.46s cubic-bezier(0.2, 0.9, 0.2, 1),
    border-radius 0.4s cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* 形变过程中先隐藏内容，避免文字被拉伸 */
#theme-modal .theme-dialog.is-flipping .modal-title,
#theme-modal .theme-dialog.is-flipping .theme-grid,
#theme-modal .theme-dialog.is-flipping .modal-close {
  opacity: 0;
  transition: opacity 0.12s ease;
}

#theme-modal .theme-dialog .modal-title,
#theme-modal .theme-dialog .theme-grid,
#theme-modal .theme-dialog .modal-close {
  transition: opacity 0.24s ease 0.1s;
}

@media (prefers-reduced-motion: reduce) {
  #theme-modal .theme-dialog {
    transition: opacity 0.2s ease;
  }
}

/* FLIP 期间卡片本体保持不透明，只让内容淡出 */
#theme-modal .theme-dialog.is-flipping {
  background: var(--bg-modal);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

/* ===== 可折叠表单（游客评论 / 此刻的想法 / 保存票根） ===== */
.dy-fold {
  position: relative;
}

.dy-fold-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, padding 0.4s cubic-bezier(0.17, 1, 0.33, 1);
}

.dy-fold-head:hover {
  background: color-mix(in srgb, var(--text-primary) 4%, transparent);
}

.dy-fold-title {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex: none;
  transition: transform 0.4s cubic-bezier(0.17, 1, 0.33, 1), font-size 0.4s cubic-bezier(0.17, 1, 0.33, 1);
}

.dy-fold-hint {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--text-muted);
  opacity: 1;
  transition: opacity 0.22s ease;
}

.dy-fold-caret {
  flex: none;
  opacity: 0.5;
  transition: transform 0.45s cubic-bezier(0.32, 1.35, 0.75, 1), opacity 0.2s ease;
}

/* 展开态：抬头变成面板标题栏 */
/* 折叠态：只保留抬头这一行（去掉表单容器自身的框） */
.dy-fold:not(.is-open) {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  margin-bottom: 0 !important;
}

/* 展开态：抬头变成卡片内的标题栏 */
.dy-fold.is-open .dy-fold-head {
  border: 0;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  background: transparent;
  padding: 0 0 12px;
  margin-bottom: 12px;
}

.dy-fold.is-open .dy-fold-hint {
  opacity: 0;
}

.dy-fold.is-open .dy-fold-caret {
  transform: rotateZ(180deg);
  opacity: 0.8;
}

.dy-fold-body {
  overflow: hidden;
  border: 0 solid var(--border-color);
  transition: max-height 0.5s cubic-bezier(0.17, 1, 0.33, 1);
}

.dy-fold-body {
  border: 0;
}

/* 展开后让原表单容器与标题栏贴合 */
.dy-fold .dy-fold-body > :first-child {
  margin-top: 0;
}

.dy-fold.is-open .dy-fold-body .comment-form-head {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .dy-fold-head,
  .dy-fold-title,
  .dy-fold-caret,
  .dy-fold-body {
    transition: none;
  }
}

/* 折叠态间距微调 */
.memo-compose.dy-fold:not(.is-open),
.ticket-compose.dy-fold:not(.is-open) {
  margin-bottom: 22px !important;
}

/* 评论表单本身没有内边距，展开时标题栏自己补 */
.comment-form.dy-fold.is-open .dy-fold-head {
  padding: 12px 14px;
}

/* 展开态：抬头标题略大一点，呼应 B 式的“行变大” */
.dy-fold.is-open .dy-fold-title {
  font-size: 0.98rem;
}

.dy-fold.is-open .dy-fold-body {
  padding-top: 2px;
}

/* ===== 相册照片：磨砂玻璃预览（参考 frosted-glass-preview） ===== */
.album-photo {
  position: relative;
}

.album-photo-frost {
  position: absolute;
  inset: -2px;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  -webkit-backdrop-filter: blur(9px) saturate(1.4) brightness(0.9);
  backdrop-filter: blur(4px) saturate(1.3) brightness(0.98);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.22) 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 34%,
    rgba(0, 0, 0, 0.45) 58%,
    #000 92%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 52%,
    rgba(0, 0, 0, 0.35) 72%,
    #000 100%
  );
  transition: opacity 0.3s ease, -webkit-backdrop-filter 0.3s ease, backdrop-filter 0.3s ease;
}

.album-photo:hover .album-photo-frost,
.album-photo:focus-visible .album-photo-frost {
  -webkit-backdrop-filter: blur(18px) saturate(1.6) brightness(0.78);
  backdrop-filter: blur(12px) saturate(1.5) brightness(0.88);
}

.album-photo-caption {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 7px;
  z-index: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  letter-spacing: 0.01em;
  color: #fdfbf4;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.26s ease, transform 0.3s cubic-bezier(0.17, 1, 0.33, 1);
  pointer-events: none;
}

.album-photo:hover .album-photo-caption,
.album-photo:focus-visible .album-photo-caption {
  opacity: 1;
  transform: translateY(0);
}

/* 触屏设备没有 hover：常驻显示磨砂与说明，避免永远看不到 */
@media (hover: none) {
  .album-photo-frost {
    -webkit-backdrop-filter: blur(7px) saturate(1.35) brightness(0.95);
    backdrop-filter: blur(7px) saturate(1.35) brightness(0.95);
  }

  .album-photo-caption {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .album-photo-frost,
  .album-photo-caption {
    transition: none;
  }
}

/* ===== 相册照片：悬停等比例放大 / 缩回（参考 jquery.zoomImgRollover） ===== */
.album-photo img {
  transform-origin: 50% 50%;
  will-change: transform;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.album-photo:hover img,
.album-photo:focus-visible img {
  transform: scale(1.3);
}

@media (prefers-reduced-motion: reduce) {
  .album-photo img {
    transition: none;
  }

  .album-photo:hover img,
  .album-photo:focus-visible img {
    transform: scale(1.06);
  }
}

/* 说说多图（最多 9 张）：3 列自动换行，正方形裁切 */
.memo-photos-grid {
  grid-template-columns: repeat(3, 86px);
  max-width: 270px;
}

.memo-photos-grid .memo-photo-link {
  width: 86px;
  height: 86px;
}

@media (max-width: 640px) {
  .memo-photos-grid {
    grid-template-columns: repeat(3, 78px);
    max-width: 246px;
  }

  .memo-photos-grid .memo-photo-link {
    width: 78px;
    height: 78px;
  }
}

/* ===== 说说图片灯箱：摆动入场（参考相册插件 swing） ===== */
@keyframes lightbox-swing {
  20% { transform: rotate(15deg); }
  40% { transform: rotate(-10deg); }
  60% { transform: rotate(5deg); }
  80% { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}

.lightbox-image.is-swing-play {
  transform-origin: top center;
  animation: lightbox-swing 1s 0.2s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox-image.is-swing-play {
    animation: none;
  }
}

/* ===== 说说头像：跟随鼠标转头 ===== */
.memo-avatar-shell--follow {
  background: transparent;
  overflow: visible;
  border-radius: 50%;
}

.memo-avatar--follow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: block;
  overflow: hidden;
  background: #f2f0eb;
}

/* 眼睛先动、头随后跟上，比同步移动更自然 */
.memo-avatar--follow .fa-pupils {
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.memo-avatar--follow .fa-head {
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.memo-avatar--follow .fa-head {
  /* 以脖子为轴：整颗头位移 + 转动 + 侧转时横向压缩（SVG 用户单位，400 视窗） */
  transform-box: view-box;
  /* 轴心放在脖子根部，位移收小、主要靠旋转，头才不会和身体脱开 */
  transform-origin: 200px 240px;
  transform: translate(calc(var(--fa-x, 0) * 12px), calc(var(--fa-y, 0) * 8px))
    rotate(calc(var(--fa-x, 0) * 11deg))
    scaleX(calc(1 - var(--fa-ax, 0) * 0.06));
}

.memo-avatar--follow .fa-pupils {
  transform: translate(calc(var(--fa-x, 0) * 10px), calc(var(--fa-y, 0) * 9px));
}

@media (prefers-reduced-motion: reduce) {
  .memo-avatar--follow .fa-head,
  .memo-avatar--follow .fa-pupils {
    transition: none;
    transform: none;
  }
}

/* ===== 桌面端：左侧导航列固定，只有正文滚动 ===== */
@media (min-width: 901px) {
  .site-header {
    position: fixed;
    top: 0;
    /* 与 .site-wrapper 的居中偏移保持一致：min(900px) 居中，最小 16px */
    left: max(16px, calc((100vw - 900px) / 2));
    width: 220px;
    height: 100vh;
    z-index: 40;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .site-header::-webkit-scrollbar {
    display: none;
  }
}

/* ===== 桌面端：页脚固定在底部 1% 处，不随页面滚动 ===== */
@media (min-width: 901px) {
  .site-footer {
    position: fixed;
    right: max(16px, calc((100vw - 900px) / 2));
    bottom: 1vh;
    left: max(16px, calc((100vw - 900px) / 2));
    z-index: 30;
    grid-row: auto;
    padding: 16px 0 8px;
    background: linear-gradient(
      to top,
      color-mix(in srgb, var(--bg-primary) 72%, transparent) 0%,
      color-mix(in srgb, var(--bg-primary) 34%, transparent) 58%,
      transparent 100%
    );
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    pointer-events: none;
  }

  /* 只有文字本身可点，其余区域让鼠标穿透到正文 */
  .site-footer a,
  .site-footer .site-footer-line {
    pointer-events: auto;
  }

  /* 给固定页脚留出空间，避免正文最后一段被压住 */
  .site-wrapper {
    padding-bottom: 104px;
  }
}

/* ===== 记录页：分类选项（足迹 / 电影） ===== */
.records-tabs {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 14px 0 18px;
}

.records-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4.5px 15px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.67rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.records-tab:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.records-tab.is-active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg-primary);
}

/* ===== 电影票 ===== */
.mv-item {
  position: relative;
  margin: 0 0 26px;
}

.mv-ticket {
  position: relative;
  padding: 18px 20px 0;
  border: 1px dashed color-mix(in srgb, var(--border-color) 85%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  color: var(--text-primary);
}

.mv-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.mv-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.mv-en {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.mv-cinema {
  flex: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.mv-hallrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0 12px;
  padding: 9px 12px;
  border: 1px dashed color-mix(in srgb, var(--border-color) 80%, transparent);
  font-size: 0.82rem;
}

.mv-hallrow p {
  margin: 0;
}

.mv-hallrow b,
.mv-line b {
  font-weight: 700;
}

.mv-seat b {
  margin-left: 14px;
}

.mv-line {
  margin: 0 0 10px;
  font-size: 0.82rem;
}

.mv-grid {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.mv-cells {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.mv-cell {
  padding: 8px 12px;
  border: 1px dashed color-mix(in srgb, var(--border-color) 80%, transparent);
  font-size: 0.82rem;
  text-align: center;
  letter-spacing: 0.02em;
}

.mv-qr {
  flex: none;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 2px;
  overflow: hidden;
}

.mv-qr img,
.mv-qr canvas {
  display: block;
}

.mv-banner {
  margin: 14px -20px 0;
  padding: 9px 20px;
  background: var(--text-primary);
  color: var(--bg-primary);
  font-size: 0.8rem;
  text-align: center;
  letter-spacing: 0.02em;
}

.mv-item .tv-delete-form {
  position: absolute;
  top: -10px;
  right: 0;
}

@media (max-width: 640px) {
  .mv-ticket {
    padding: 14px 14px 0;
  }

  .mv-banner {
    margin: 14px -14px 0;
    padding: 8px 14px;
    font-size: 0.74rem;
  }

  .mv-hallrow {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .mv-seat b {
    margin-left: 8px;
  }

  .mv-qr {
    width: 64px;
    height: 64px;
  }
}

/* ===== 页面标题（QUICK THOUGHTS / 记录 / 友链 / 相册）固定在顶部 ===== */
@media (min-width: 901px) {
  .page-title-header,
  .memos-top {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 14px 0 12px;
    margin-bottom: 6px;
    background: linear-gradient(
      to bottom,
      var(--bg-primary) 84%,
      color-mix(in srgb, var(--bg-primary) 55%, transparent) 94%,
      transparent 100%
    );
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }

  /* 动态页：外层 .memos-top 已经承担固定，内层标题不再重复 */
  .memos-top .page-title-header {
    position: static;
    padding: 0;
    margin: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .page-title-header,
  .memos-top {
    background: var(--bg-primary);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ===== 记录页：meta 行内的分类下拉（足迹 / 电影） ===== */
.records-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.records-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.records-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px 1px 9px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.72rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.records-switch-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.records-switch.is-open .records-switch-btn {
  color: var(--text-primary);
  border-color: var(--text-primary);
  background: color-mix(in srgb, var(--text-primary) 6%, transparent);
}

.records-switch-caret {
  flex: none;
  opacity: 0.6;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

.records-switch.is-open .records-switch-caret {
  transform: rotate(180deg);
  opacity: 0.9;
}

.records-switch-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 45;
  min-width: 96px;
  padding: 5px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-card);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top left;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.22s;
}

.records-switch.is-open .records-switch-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.records-switch-item {
  display: block;
  padding: 5px 10px;
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.76rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.records-switch-item:hover {
  background: color-mix(in srgb, var(--text-primary) 8%, transparent);
  color: var(--text-primary);
}

.records-switch-item.is-active {
  color: var(--text-primary);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .records-switch-btn,
  .records-switch-caret,
  .records-switch-menu {
    transition: none;
  }
}

/* 分类下拉：不显示文字，只保留小箭头 */
.records-switch-btn {
  gap: 0;
  padding: 3px 7px;
  line-height: 1;
}

.records-switch-caret {
  width: 12px;
  height: 12px;
}

/* ===== 电影票：标题行的删除按钮（常显） ===== */
.mv-head-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.mv-delete-form {
  margin: 0;
}

.mv-delete-btn {
  padding: 2px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.68rem;
  line-height: 1.6;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.mv-delete-btn:hover {
  color: #b4534b;
  border-color: #b4534b;
  background: color-mix(in srgb, #b4534b 8%, transparent);
}

@media (max-width: 640px) {
  .mv-head-side {
    gap: 8px;
  }

  .mv-cinema {
    font-size: 0.82rem;
  }
}

/* 电影票列表：一行一张（票根版式较宽，双列会挤） */
.tv-list--movie {
  grid-template-columns: minmax(0, 1fr);
}

/* ===== 电影票：一行两张，按参考图比例压缩排版 ===== */
.tv-list--movie {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.tv-list--movie .mv-item {
  margin-bottom: 0;
}

.tv-list--movie .mv-ticket {
  padding: 13px 14px 0;
}

.tv-list--movie .mv-head {
  gap: 10px;
  align-items: flex-start;
}

.tv-list--movie .mv-title {
  font-size: 0.92rem;
  line-height: 1.3;
}

.tv-list--movie .mv-en {
  font-size: 0.7rem;
  margin-top: 1px;
}

.tv-list--movie .mv-cinema {
  font-size: 0.78rem;
  margin-top: 2px;
  text-align: right;
}

.tv-list--movie .mv-hallrow {
  margin: 8px 0 8px;
  padding: 6px 9px;
  gap: 8px 10px;
  font-size: 0.7rem;
}

.tv-list--movie .mv-seat b {
  margin-left: 8px;
}

.tv-list--movie .mv-line {
  margin-bottom: 6px;
  font-size: 0.7rem;
}

.tv-list--movie .mv-grid {
  gap: 10px;
}

.tv-list--movie .mv-cells {
  gap: 5px;
}

.tv-list--movie .mv-cell {
  padding: 5px 8px;
  font-size: 0.7rem;
}

.tv-list--movie .mv-qr {
  width: 56px;
  height: 56px;
  transform: scale(0.76);
  transform-origin: top right;
  margin: 0 -6px 0 0;
}

.tv-list--movie .mv-banner {
  position: relative;
  margin: 9px -14px 0;
  padding: 6px 14px;
  font-size: 0.66rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.tv-list--movie .mv-banner-text {
  flex: 1 1 auto;
  text-align: center;
  line-height: 1.45;
  padding: 0 36px 0 0;
  font-size: 0.64rem;
}

.tv-list--movie .mv-delete-form {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
}

.tv-list--movie .mv-delete-btn {
  padding: 1px 8px;
  border-color: color-mix(in srgb, var(--bg-primary) 55%, transparent);
  color: color-mix(in srgb, var(--bg-primary) 78%, transparent);
  font-size: 0.62rem;
  line-height: 1.5;
}

.tv-list--movie .mv-delete-btn:hover {
  color: #fff;
  border-color: #fff;
  background: color-mix(in srgb, #fff 18%, transparent);
}

@media (max-width: 900px) {
  .tv-list--movie {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===== 说说表情面板：改为固定比例的浮层（不再把评论框撑高） ===== */
.memo-comment-form {
  position: relative;
}

.memo-emoji-panel {
  position: absolute;
  left: 0;
  /* 贴在表情按钮上方，只压住输入框，不挡昵称/邮箱 */
  bottom: calc(46px + 8px);
  z-index: 40;
  width: min(320px, calc(100vw - 56px));
  height: min(240px, 38vh);
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 8px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  border: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-card);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
  -webkit-overflow-scrolling: touch;
}

.memo-emoji-panel[hidden] {
  display: none;
}

.memo-emoji {
  padding: 4px 0;
  font-size: 1.15rem;
  line-height: 1.3;
}

@media (max-width: 640px) {
  .memo-emoji-panel {
    width: min(300px, calc(100vw - 44px));
    height: min(210px, 32vh);
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .memo-emoji {
    font-size: 1.2rem;
  }
}

/* 表情浮层的小尖角，指向下方表情按钮 */
.memo-emoji-panel::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
  transform: rotate(45deg);
}

/* ===== 说说头像：静态剪影（替换原来的跟随鼠标头像） ===== */
.memo-avatar-shell--round {
  border-radius: 50%;
  background: transparent;
}

.memo-avatar--static {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* ===== 主题弹窗收起：关掉整屏毛玻璃，避免每帧重算 blur 造成卡顿 ===== */
.modal-backdrop.is-closing,
.modal-backdrop.is-closing .gradient-blur,
.modal-backdrop.is-closing .gradient-blur > div,
.modal-backdrop.is-closing .backdrop-blur,
.modal-backdrop.is-closing .modal-backdrop-blur {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* 收起时给模糊层一个接近原效果的底色，避免 blur 一撤出现「变清」的突兀感 */
#theme-modal.is-closing .gradient-blur {
  background: color-mix(in srgb, var(--bg-primary) 46%, transparent) !important;
}

/* ===== 主题切换：新主题以圆形从右上角铺开（对齐参考站效果） ===== */
/* 主题切换时把正文也并入 root 快照：.site-main 平时有独立 view-transition-name，
   会被排除在 root 之外，导致圆形揭示只揭开背景层 */
html.theme-reveal .site-main {
  view-transition-name: none;
}

/* 主题切换瞬间要「截一张干净的图」：
   body 上有 background-color/color 的 0.35s 过渡，快照会拍到过渡中间态（灰蒙蒙），
   这里在切换期间关掉所有过渡，动画结束（class 移除）后恢复 */
/* 只关 html/body 的过渡即可：
   之前用 `body *` 关整棵树，等于每次切换都让全页所有元素失效样式，
   实测点击后要多等 ~17ms 才出第一帧。
   剩下的元素过渡只有 0.15~0.35s，快照里几乎看不出来。 */
html.theme-reveal,
html.theme-reveal body {
  transition: none !important;
}

/* View Transition 默认用 plus-lighter 混合两层，去掉淡入后会把画面叠成灰的，
   这里把整条伪元素链都改回普通混合 */
html.theme-reveal::view-transition-group(root),
html.theme-reveal::view-transition-image-pair(root),
html.theme-reveal::view-transition-old(root),
html.theme-reveal::view-transition-new(root) {
  mix-blend-mode: normal !important;
}

html.theme-reveal::view-transition-image-pair(root) {
  isolation: isolate;
}

html.theme-reveal::view-transition-old(root) {
  /* 旧页面原地不动，垫在下面 */
  animation: none;
  z-index: 1;
  opacity: 1;
}

/* 新主题以圆弧从右上角「翻」进来：圆心在右上角、半径很大，
   边缘看起来像一张纸的弧边，而不是小圆 */
html.theme-reveal::view-transition-new(root) {
  z-index: 2;
  opacity: 1;
  mix-blend-mode: normal;
  will-change: clip-path;
  clip-path: circle(160vmax at 100% 0%);
  animation: themeIrisIn 830ms cubic-bezier(0.42, 0, 0.28, 1) both;
}

@keyframes themeIrisIn {
  from {
    clip-path: circle(0px at 100% 0%);
  }
  to {
    clip-path: circle(160vmax at 100% 0%);
  }
}

/* 旧页面在圆弧扫过的同时压成灰色半透明：
   像一层灰纱被翻起来，圆弧边缘之外是发灰的旧内容 */
html.theme-reveal::view-transition-old(root) {
  z-index: 1;
  opacity: 1;
  mix-blend-mode: normal;
  animation: themeVeil 830ms cubic-bezier(0.42, 0, 0.28, 1) both;
}

@keyframes themeVeil {
  from {
    filter: brightness(1) saturate(1) contrast(1);
    opacity: 1;
  }
  to {
    filter: brightness(0.62) saturate(0.32) contrast(0.92);
    opacity: 0.5;
  }
}

@media (max-width: 640px) {
  html.theme-reveal::view-transition-new(root),
  html.theme-reveal::view-transition-old(root) {
    animation-duration: 830ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.theme-reveal::view-transition-new(root),
  html.theme-reveal::view-transition-old(root) {
    animation: none !important;
  }
}

/* ===== 主题弹窗：普通缓入缩放弹窗（丝滑版） ===== */
#theme-modal .theme-dialog {
  opacity: 0;
  transform: translateY(18px) scale(0.94);
  /* 透明度先到位（避免长时间半透明看到背后文字），位移/缩放慢慢收 —— 观感是「缓缓浮起」 */
  transition:
    opacity 0.2s ease-out,
    transform 0.82s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

#theme-modal.active .theme-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* 收起：更短、更快，回缩一点点再淡出 */
#theme-modal.is-closing .theme-dialog {
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition:
    opacity 0.3s ease,
    transform 0.36s cubic-bezier(0.4, 0, 1, 1);
}

/* 遮罩比卡片更早到位：先把页面压暗，卡片再慢慢透出来，避免「卡片半透明时看到背后文字」 */
#theme-modal {
  transition: opacity 0.32s ease, visibility 0s linear 0.32s;
}

#theme-modal.active {
  transition: opacity 0.32s ease;
}

/* 内部元素不再逐个错峰，跟随卡片整体淡入 */
#theme-modal .theme-dialog > *,
#theme-modal .theme-option-btn {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  #theme-modal .theme-dialog,
  #theme-modal .theme-dialog > *,
  #theme-modal .theme-option-btn,
  #theme-modal.is-closing .theme-dialog,
  #theme-modal.is-closing .theme-dialog > *,
  #theme-modal.is-closing .theme-option-btn {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}

/* ===== 主题切换提速：快照阶段先关掉弹窗的整屏毛玻璃 =====
   8 层 backdrop-filter 的弹窗快照要几十毫秒，是点击后那段卡顿的主因；
   反正圆弧马上盖过去，先关掉不影响观感。 */
html.theme-reveal #theme-modal .gradient-blur,
html.theme-reveal #theme-modal .gradient-blur > div,
html.theme-reveal #theme-modal .shade {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* 主题按钮按下即时反馈，不用等过渡开始 */
.theme-option-btn:active {
  transform: scale(0.97);
  transition: transform 0.08s ease;
}

/* ===== 主题弹窗：取消背景灰色虚化（保留卡片本身的投影） ===== */
#theme-modal .shade,
#theme-modal .gradient-blur,
#theme-modal .gradient-blur > div,
#theme-modal.is-closing .gradient-blur {
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  opacity: 0 !important;
  transition: none !important;
}

/* ===== 打开弹窗时不要给左侧导航列加底色 =====
   原来 html.overlay-open 会给 .site-header 铺 92% 实色，把纸纹/水墨背景盖掉，
   看起来和正文背景不一致。弹窗本身已有遮罩，不需要这一层。 */
html.overlay-open .site-header {
  background: transparent;
}

/* ===== 导航：点击选择指示器（参照 Select Role 的圆→胶囊动效） ===== */
.desktop-nav {
  position: relative;
}

.nav-pick {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  z-index: 0;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--text-primary);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    transform 0.44s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.44s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.44s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s ease;
  /* 不再用 will-change：独立图层在页面布局变化时会闪烁 */
  backface-visibility: hidden;
}

.nav-pick.is-ready {
  opacity: 1;
}

/* 选中态：胶囊里留一层很淡的填充；每次点击时这层填充会像水滴一样重新涨满 */
.nav-pick-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--text-primary);
  opacity: 0.13;
  transform: scale(0);
  transform-origin: 50% 50%;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-pick.is-ready .nav-pick-fill {
  transform: scale(1);
}

/* 当前项不再用整块反色，改成指示器 */
.site-nav .nav-link.current,
html[data-ink="1"] .nav-link.current {
  color: var(--text-primary);
  background: transparent;
  text-decoration-color: transparent;
  filter: none !important;
  text-shadow: none !important;
}

.site-nav .nav-link,
.site-nav button.nav-link {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .nav-pick,
  .nav-pick.is-filling .nav-pick-fill {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* 悬停也不再用整块反色，改淡一点，避免和指示器打架 */
.site-nav .nav-link:hover,
.site-nav button.nav-link:hover {
  color: var(--text-primary);
  background: transparent;
  text-decoration-color: currentColor;
  opacity: 0.68;
}

.site-nav .nav-link.current:hover {
  opacity: 1;
  text-decoration-color: transparent;
}

/* ===== 手机端电影票：观影厅与座位排成一行 ===== */
@media (max-width: 640px) {
  .mv-hallrow {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .mv-hallrow p:first-child {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mv-hallrow .mv-seat {
    flex: none;
    white-space: nowrap;
  }

  .mv-seat b {
    margin-left: 6px;
  }
}

/* ===== 手机端票根按参考站比例收窄（内容区的 ~83%），左对齐 ===== */
@media (max-width: 640px) {
  .tv-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .tv-list > li {
    width: 83%;
  }
}

/* ===== 票根虚线弱化：原来的虚线在深色主题下太跳 ===== */
.tv-ticket {
  --tv-line: color-mix(in srgb, var(--text-primary) 15%, transparent);
  border-color: color-mix(in srgb, var(--text-primary) 15%, transparent);
}

.tv-box {
  border-color: color-mix(in srgb, var(--text-primary) 13%, transparent);
}

/* 电影票也改成「文字色 + 低透明度」，深浅主题都自适应，且看得见但不抢眼 */
.mv-ticket {
  border-color: color-mix(in srgb, var(--text-primary) 17%, transparent);
}

.mv-hallrow {
  border-color: color-mix(in srgb, var(--text-primary) 14%, transparent);
}

.mv-grid .mv-cell,
.mv-cell {
  border-color: color-mix(in srgb, var(--text-primary) 12%, transparent);
}

/* 票根里的分隔线文字（旅行纪念·非乘车或入场凭证）也一起压淡 */
.tv-divider {
  color: color-mix(in srgb, var(--text-primary) 30%, transparent) !important;
}

/* ===== 说说点赞：摇铃式微交互（摆动 + 扩散波 + 数字跳动） ===== */
.memo-like-btn {
  position: relative;
}

/* 扩散波 */
.memo-like-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0;
  pointer-events: none;
}

.memo-like-btn.is-popping::after {
  animation: likePing 0.72s ease-out both;
}

@keyframes likePing {
  0% {
    opacity: 0.5;
    transform: scale(0.5);
  }
  70% {
    opacity: 0.1;
    transform: scale(1.9);
  }
  100% {
    opacity: 0;
    transform: scale(2.2);
  }
}

/* 图标：绕底部来回摆，幅度递减（呼应铃铛） */
.memo-like-btn.is-popping svg {
  transform-origin: 50% 82%;
  animation: likeWobble 0.74s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes likeWobble {
  0% {
    transform: rotate(0deg) scale(1);
  }
  14% {
    transform: rotate(-16deg) scale(1.18);
  }
  30% {
    transform: rotate(13deg) scale(1.24);
  }
  46% {
    transform: rotate(-10deg) scale(1.14);
  }
  62% {
    transform: rotate(6deg) scale(1.07);
  }
  78% {
    transform: rotate(-3deg) scale(1.03);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}

/* 数字：弹一下 */
.memo-like-count {
  display: inline-block;
}

.memo-like-count.is-bumping {
  animation: likeCountBump 0.52s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes likeCountBump {
  0% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.42);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .memo-like-btn.is-popping svg,
  .memo-like-btn.is-popping::after,
  .memo-like-count.is-bumping {
    animation-duration: 0.01ms !important;
  }
}

/* ===== 记录页卡片：跟随鼠标的 3D 倾斜 + 光斑（Transitions.dev Card hover tilt） ===== */
:root {
  --tilt-perspective: 1000px;
  --tilt-return: 900ms;
  --tilt-return-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tilt-follow: 320ms;
  --tilt-follow-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tilt-glare-opacity: 0.26;
  --tilt-glare-fade: 300ms;
  --tilt-glare-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.t-tilt {
  height: 100%;
  position: relative;
}

.t-tilt-card {
  position: relative;
  overflow: hidden;
  height: 100%;
  transform:
    perspective(var(--tilt-perspective))
    rotateX(var(--tilt-rx, 0deg))
    rotateY(var(--tilt-ry, 0deg));
  transform-style: preserve-3d;
  transition: transform var(--tilt-return) var(--tilt-return-ease);
}

.t-tilt-card.is-tilting {
  transition: transform var(--tilt-follow) var(--tilt-follow-ease);
  /* 只在跟手阶段提升合成层，避免每张卡片常驻 */
  will-change: transform;
}

.t-tilt-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle 95px at var(--tilt-gx, 50%) var(--tilt-gy, 50%),
      rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.05) 52%, rgba(255, 255, 255, 0) 84%),
    radial-gradient(circle 200px at var(--tilt-gx, 50%) var(--tilt-gy, 50%),
      rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03) 58%, rgba(255, 255, 255, 0) 78%),
    radial-gradient(circle 360px at var(--tilt-gx, 50%) var(--tilt-gy, 50%),
      rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 88%);
  transition: opacity var(--tilt-glare-fade) var(--tilt-glare-ease);
}

.t-tilt.is-hover .t-tilt-glare {
  opacity: var(--tilt-glare-opacity);
}

/* 深色主题下白光太冲，压低一点 */
html[data-theme="night"] .t-tilt-glare {
  opacity: 0;
}

html[data-theme="night"] .t-tilt.is-hover .t-tilt-glare {
  opacity: 0.14;
}

@media (prefers-reduced-motion: reduce) {
  .t-tilt-card {
    transform: none !important;
    transition: none !important;
  }
  .t-tilt-glare {
    display: none;
  }
}

/* ===== 折叠表单展开：丝滑瀑布（只动合成层，不逐帧重绘） ===== */
/* 容器负责「往下长」，内容只做 transform/opacity；
   揭开效果由 overflow:hidden 的裁切边界完成，不需要 mask / clip-path 动画。 */
.dy-fold-body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  border: 0;
  transition: grid-template-rows 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.dy-fold.is-open .dy-fold-body {
  grid-template-rows: 1fr;
}

.dy-fold-inner {
  min-height: 0;
  overflow: hidden;
  position: relative;
  transform: translateY(-14px);
  opacity: 0;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.24s ease-out;
}

.dy-fold.is-open .dy-fold-inner {
  transform: translateY(0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .dy-fold-body,
  .dy-fold-inner {
    transition-duration: 0.01ms !important;
  }
}


/* ===== 展开动画期间：关掉吸顶毛玻璃，避免逐帧重算背景模糊（移动端顿挫主因） ===== */
html.fold-animating .site-header,
html.fold-animating .site-header.is-scrolled {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  /* 不要再强制刷一层 --bg-primary：左侧导航列会变成一条偏白的面板 */
  transition: none !important;
}

/* 列表只做位置平移，内部不再重排，减少展开时的布局量 */
.memo-list {
  contain: layout;
}

/* ===== 文章页：右下角签名做海报入口 + 点赞动效对齐说说 ===== */
.post-signature--btn {
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", "Apple Chancery", cursive;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  transform: rotate(-3deg);
  user-select: none;
  transition: color 0.2s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

.post-signature--btn:hover,
.post-signature--btn:focus-visible {
  color: var(--accent-color);
  transform: rotate(-3deg) translateY(-2px);
}

.post-signature--btn:active {
  transform: rotate(-3deg) translateY(0) scale(0.97);
}

.post-signature--btn:focus-visible {
  outline: 1px dashed var(--border-color);
  outline-offset: 6px;
}

/* 点赞：与说说同款 —— 图标摆动 + 扩散波 + 数字弹跳 */
.post-like-btn {
  position: relative;
}

.post-like-btn.is-liked {
  color: var(--accent-color);
}

.post-like-btn.is-liked svg {
  fill: currentColor;
}

.post-like-btn::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0;
  pointer-events: none;
}

.post-like-btn.is-popping::after {
  animation: likePing 0.72s ease-out both;
}

.post-like-btn.is-popping svg {
  transform-origin: 50% 82%;
  animation: likeWobble 0.74s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.post-like-count {
  display: inline-block;
}

.post-like-count.is-bumping {
  animation: likeCountBump 0.52s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .post-like-btn.is-popping svg,
  .post-like-btn.is-popping::after,
  .post-like-count.is-bumping {
    animation-duration: 0.01ms !important;
  }
}

/* ===== 海报（TEPoster）背景跟随当前主题 ===== */
.teposter-root.teposter-default {
  background-color: var(--bg-primary) !important;
  background-image: url("assets/img/textures/moon.png") !important;
  background-size: 180px 180px !important;
  background-position: center top !important;
  background-repeat: repeat !important;
  background-attachment: scroll !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
  font-family: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif !important;
}

html[data-theme="typewriter"] .teposter-root.teposter-default {
  background-image: url("assets/img/textures/paper-fiber.svg") !important;
  background-size: 640px 640px !important;
}

html[data-theme="old-paper"] .teposter-root.teposter-default {
  background-image: url("assets/img/textures/paper.png") !important;
  background-size: 180px 180px !important;
}

html[data-theme="moss-ink"] .teposter-root.teposter-default {
  background-image: url("assets/img/textures/pine.png") !important;
  background-size: 102px 102px !important;
}

html[data-theme="moon-white"] .teposter-root.teposter-default {
  background-image: url("assets/img/textures/moon.png") !important;
  background-size: 180px 180px !important;
}

html[data-theme="night"] .teposter-root.teposter-default {
  background-image:
    linear-gradient(to right, rgba(44, 53, 68, 0.2) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(44, 53, 68, 0.2) 1px, transparent 1px) !important;
  background-size: 5px 5px !important;
}

html[data-theme="ink-painting"] .teposter-root.teposter-default {
  background-image: url("assets/img/textures/ink-painting.jpg") !important;
  background-size: cover !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
}

/* 海报内部文字配色 */
.teposter-root.teposter-default .teposter-logo-title {
  color: var(--text-primary) !important;
  font-family: inherit !important;
  letter-spacing: 0.04em;
}

.teposter-root.teposter-default .teposter-title {
  color: var(--text-primary) !important;
  font-family: inherit !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
}

.teposter-root.teposter-default .teposter-summary {
  color: var(--text-secondary) !important;
  font-family: inherit !important;
}

.teposter-root.teposter-default .teposter-random {
  background: var(--bg-secondary) !important;
  border-radius: 4px !important;
}

.teposter-root.teposter-default .teposter-random img {
  border-radius: 4px !important;
}

.teposter-root.teposter-default .teposter-date-badge {
  background: rgba(20, 18, 14, 0.82) !important;
}



/* ===== 文章页点赞图标：手套式大拇指（参考截图） ===== */
.post-like-btn svg path {
  fill: currentColor;
  fill-opacity: 0.32;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: fill-opacity 0.18s ease, stroke 0.18s ease;
}

.post-like-btn.is-liked svg path {
  fill-opacity: 1;
}

/* 波纹对准图标中心（图标宽 21） */
.post-like-btn::after {
  left: 10.5px;
}

/* ===== 相册：普通模式右上角的「艺术模式」入口 ===== */
.albums-page {
  position: relative;
}

.albums-mode-toggle {
  position: absolute;
  z-index: 25;
  top: 2px;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  background: transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.albums-mode-toggle:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
  background: var(--accent-soft);
}

.albums-mode-toggle svg {
  display: block;
}

@media (max-width: 640px) {
  .albums-mode-toggle {
    top: 0;
    padding: 6px 11px;
    font-size: 0.72rem;
  }
}

/* 相册照片：从上往下渐进显示 */
.js-reveal {
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  --reveal-delay: 0ms;
}

.js-reveal.is-revealed {
  animation: photoReveal 1700ms cubic-bezier(0.16, 0.84, 0.3, 1) var(--reveal-delay) both;
}

@keyframes photoReveal {
  0% {
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    transform: translateY(-1.2%);
  }
  60% {
    opacity: 1;
  }
  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal,
  .js-reveal.is-revealed {
    clip-path: none;
    opacity: 1;
    animation: none;
  }
}


/* 展开折叠面板时，面板的合成层会盖到左侧导航上（表现为导航列发白）。
   让导航自己成为独立层并提到最上面，避免被盖住。 */
.site-nav.desktop-nav {
  position: relative;
  z-index: 6;
  isolation: isolate;
  background: transparent;
}

/* 胶囊指示器不允许超过所在导航项：布局抖动时避免撑成一块白底 */
.nav-pick {
  max-width: 100%;
}

.nav-pick-fill {
  max-width: 100%;
  max-height: 100%;
}

/* 展开动画期间的减负：局部包含 + 缩短时长 + 关掉阴影重绘 */
.dy-fold-body {
  contain: layout paint;
}

html.fold-animating .dy-fold-body {
  transition-duration: 0.32s !important;
}

html.fold-animating .memo-compose,
html.fold-animating .dy-fold-head {
  box-shadow: none !important;
}

/* 备案号 */
.site-footer-icp {
  margin-top: 0.4rem;
  font-size: 0.86rem;
  opacity: 0.6;
  letter-spacing: 0.02em;
}

.site-footer-icp a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, currentColor 35%, transparent);
}

.site-footer-icp a:hover {
  opacity: 1;
  border-bottom-color: currentColor;
}
