:root {
  --bg: #fff;
  --surface: #f5f5f7;
  --surface-2: #ebebef;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --accent: #0071e3;
  --link: #0066cc;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.14);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --glass: rgba(255, 255, 255, 0.42);
  --glass-strong: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.65);
  --blur: saturate(200%) blur(30px);
}

[data-theme="dark"] {
  --bg: #000;
  --surface: #1d1d1f;
  --surface-2: #2c2c2e;
  --ink: #f5f5f7;
  --muted: #86868b;
  --line: #333336;
  --accent: #2997ff;
  --link: #2997ff;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  --glass: rgba(28, 28, 30, 0.45);
  --glass-strong: rgba(28, 28, 30, 0.58);
  --glass-border: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 12% 8%, rgba(0, 113, 227, 0.22), transparent 60%),
    radial-gradient(50% 40% at 88% 12%, rgba(255, 45, 85, 0.16), transparent 60%),
    radial-gradient(70% 60% at 50% 100%, rgba(88, 86, 214, 0.18), transparent 65%);
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(60% 50% at 12% 8%, rgba(41, 151, 255, 0.2), transparent 60%),
    radial-gradient(50% 40% at 88% 12%, rgba(191, 90, 242, 0.15), transparent 60%),
    radial-gradient(70% 60% at 50% 100%, rgba(100, 210, 255, 0.11), transparent 65%);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

input,
textarea {
  font: inherit;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.container {
  width: min(1080px, calc(100% - 48px));
  margin-inline: auto;
}

.band {
  padding: 56px 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -52px;
  z-index: 60;
  padding: 10px 18px;
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 10px;
  z-index: 40;
  background: transparent;
  margin-top: 10px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid var(--glass-border);
  border-radius: 980px;
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 7px;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 黑色 X 图标在浅色模式下用 mix-blend-mode: darken 变白,深色模式保持原样 */
[data-theme="light"] .brand-mark img,
[data-theme="light"] .user-avatar img,
[data-theme="light"] .about-band .avatar img,
[data-theme="light"] .about-page-inner .avatar img {
  filter: invert(1);
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link.active {
  color: var(--ink);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-login {
  padding: 7px 18px;
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), var(--shadow);
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.user-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}


[data-theme="light"] .avatar img {
}

.user-menu-wrap {
  position: relative;
  display: block;
}

.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 170px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.user-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.user-menu-item:hover {
  background: var(--surface-2);
}

.menu-badge {
  display: inline-block;
  min-width: 16px;
  padding: 1px 5px;
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}

.user-avatar .menu-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  z-index: 50;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.9);
}

[data-theme="dark"] .user-avatar .menu-badge {
  box-shadow: 0 0 0 2px rgba(0,0,0,0.9);
}

.btn-login:hover {
  filter: brightness(1.08);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--ink);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--glass-strong);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.icon-moon {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: block;
}

.menu-btn {
  display: none;
}

/* Intro */
.intro {
  padding: 72px 0 48px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 760px;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.intro-text {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.intro-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.stat {
  padding: 8px 16px;
  border-radius: 980px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--muted);
  font-size: 13px;
}

.stat strong {
  color: var(--ink);
  font-weight: 600;
}

/* Featured */
.featured-band {
  padding-top: 0;
}

.featured-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.featured-media {
  position: relative;
  min-height: 340px;
}

.featured-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
}

.featured-content h3 {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.featured-content h3 a:hover {
  color: var(--link);
}

.featured-excerpt {
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 15px;
}

.post-category {
  display: inline-block;
  width: fit-content;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: 980px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.post-category:hover {
  color: var(--accent);
}

.post-date {
  color: var(--muted);
  font-size: 13px;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  color: var(--link);
  font-size: 14px;
  font-weight: 600;
}

.arrow-link svg {
  width: 14px;
  height: 14px;
}

.arrow-link:hover {
  text-decoration: underline;
}

/* Sections */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.section-head h2,
.category-band h2,
.about-band h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--link);
  font-size: 14px;
  font-weight: 500;
}

.text-link:hover {
  text-decoration: underline;
}

.text-link svg {
  width: 14px;
  height: 14px;
}

.latest-band {
  padding-top: 48px;
}

/* Post grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.post-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
}

.post-card-body h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.post-card-body h3 a:hover {
  color: var(--link);
}

.post-card-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

/* Featured rail */
.featured-rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 18px;
  margin: 0 -4px;
  scrollbar-width: none;
}

.featured-rail::-webkit-scrollbar {
  display: none;
}

.rail-card {
  flex: 0 0 100%;
  scroll-snap-stop: always;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  scroll-snap-align: start;
}

.rail-card-media {
  position: relative;
  min-height: 360px;
}

.rail-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rail-card:hover .rail-card-media img {
  transform: scale(1.04);
}

.rail-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  padding: 40px;
}

.rail-card-body h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.rail-card-body h3 a:hover {
  color: var(--link);
}

.rail-card-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.rail-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.section-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.rail-nav {
  display: inline-flex;
  gap: 8px;
}

/* Categories */
.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 980px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  font-size: 14px;
  font-weight: 500;
}

.category-chip:hover {
  background: var(--glass-strong);
}

.category-chip .count {
  color: var(--muted);
  font-size: 13px;
}

/* About band */
.about-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 28px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  background: var(--glass);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-copy p {
  max-width: 640px;
  margin: 10px 0 16px;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: transparent;
  padding: 26px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: var(--muted);
}

.footer-inner a:hover {
  color: var(--ink);
}

/* Page head / archive */
.page-head {
  padding: 52px 0 30px;
}

.page-head h1 {
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.archive-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 260px;
  max-width: 420px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.search-box:focus-within {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}

.search-box svg {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  padding: 12px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-box input::placeholder {
  color: var(--muted);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  padding: 8px 16px;
  border-radius: 980px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.filter-chip:hover {
  color: var(--ink);
  background: var(--glass-strong);
}

.filter-chip.active {
  background: var(--accent);
  color: #fff;
}

.tag-filter {
  margin-top: 10px;
}

.result-count {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* Archive list */
.archive-list {
  padding-top: 0;
}

.archive-list-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.archive-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  transition: transform 0.2s ease;
}

.archive-row:hover {
  transform: translateY(-2px);
}

.archive-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-2);
}

.archive-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.archive-row-main h3 {
  font-size: 16px;
  font-weight: 600;
}

.archive-row-main h3 a:hover {
  color: var(--link);
}

.archive-row-main p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.archive-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

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

/* Timeline */
.timeline-band {
  padding-top: 0;
}

.timeline-year {
  margin-bottom: 44px;
}

.timeline-year h2 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.timeline-month {
  margin-bottom: 26px;
}

.timeline-month-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.timeline-item:hover {
  background: var(--surface-2);
}

.timeline-item-title {
  font-size: 15px;
  font-weight: 600;
}

.timeline-item:hover .timeline-item-title {
  color: var(--link);
}

.timeline-item-meta {
  flex: none;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

/* Post page */
.progress-track {
  position: fixed;
  top: 80px;
  left: 0;
  z-index: 30;
  width: 100%;
  height: 3px;
}

#progressBar {
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.08s linear;
}

.post-hero {
  padding: 56px 0 32px;
}

.post-header {
  max-width: 780px;
}

.post-header h1 {
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.reading-time svg {
  width: 14px;
  height: 14px;
}

.meta-dot {
  opacity: 0.6;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-chip {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 980px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

a.tag-chip:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.crumb-link {
  color: var(--ink);
  font-weight: 600;
}

.crumb-link:hover {
  color: var(--link);
}

.post-body {
  padding-top: 0;
}

.prose {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.75;
}

.prose p {
  margin: 0 0 18px;
}

.prose h2 {
  margin: 38px 0 14px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: 21px;
  font-weight: 600;
}

.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

.prose li {
  margin: 6px 0;
}

.prose a {
  color: var(--link);
}

.prose a:hover {
  text-decoration: underline;
}

.prose blockquote {
  margin: 22px 0;
  padding: 14px 22px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--muted);
}

.prose blockquote p {
  margin: 0;
}

.prose code {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.9em;
}

.prose pre {
  overflow-x: auto;
  margin: 22px 0;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  line-height: 1.6;
}

.prose pre code {
  padding: 0;
  background: transparent;
}

.code-block-wrap {
  position: relative;
  margin: 22px 0;
}

.prose .code-block-wrap pre {
  margin: 0;
}

.code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.code-copy-btn:hover {
  opacity: 1;
  color: var(--accent);
}

.code-copy-btn.copied {
  opacity: 1;
  color: var(--accent);
}

.prose img {
  margin: 22px 0;
  border-radius: 14px;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 48px;
  align-items: start;
}

.post-aside {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.aside-card {
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.like-box {
  text-align: center;
}

.like-label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 980px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.like-btn svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

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

.like-btn.liked {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.like-btn.liked svg {
  color: #fff;
}

.like-btn:disabled {
  cursor: default;
}

.toc-title {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.toc {
  display: flex;
  flex-direction: column;
}

.toc-link {
  padding: 6px 0;
  color: var(--muted);
  font-size: 13px;
}

.toc-link:hover {
  color: var(--ink);
}

.toc-h3 {
  padding-left: 14px;
}

.comments-section {
  margin-top: 8px;
  padding: 40px 0 64px;
}

.comments-title {
  margin-bottom: 18px;
  font-size: 22px;
  font-weight: 700;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
}

.comment-item {
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

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

.comment-head .comment-avatar {
  flex-shrink: 0;
}

.comment-head strong {
  flex: 0 0 auto;
}

.comment-head > span,
.comment-head .comment-time {
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
}

.comment-head .comment-device {
  margin-left: 0;
}

.comment-device-left {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  margin-right: auto;
}

/* Resources */
.resource-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 10px;
}

.resource-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: var(--surface-2);
  flex-shrink: 0;
}

.resource-info {
  flex: 1;
  min-width: 0;
}

.resource-info strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-info span {
  font-size: 12px;
  color: var(--muted);
}

.resource-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.resource-upload {
  margin-bottom: 20px;
  padding: 20px;
}

.resource-upload h2 {
  font-size: 18px;
  margin: 0 0 14px;
}

.resource-drop {
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.resource-drop.dragover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.resource-drop svg {
  width: 36px;
  height: 36px;
  color: var(--muted);
  margin-bottom: 8px;
}

.resource-drop p {
  margin: 2px 0;
  color: var(--ink);
}

.resource-drop .hint {
  color: var(--muted);
  font-size: 13px;
}

.resource-upload-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resource-upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}

.resource-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.resource-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Resource grid */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.resource-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.resource-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
  place-items: center;
}

.resource-thumb img,
.resource-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.resource-icon-big {
  font-size: 40px;
  color: var(--muted);
}

.resource-info {
  padding: 12px 16px 8px;
}

.resource-info strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-info span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.resource-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: monospace;
  font-size: 11px;
  color: var(--line);
}

.resource-actions {
  display: flex;
  gap: 6px;
  padding: 8px 16px 14px;
  flex-wrap: wrap;
}

.resource-actions .btn {
  padding: 5px 12px;
  font-size: 12px;
}

.resource-upload-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.5);
}

.resource-upload-card {
  width: min(520px, calc(100vw - 40px));
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-lg);
}

.resource-upload-card h2 {
  font-size: 18px;
  margin: 0 0 14px;
}

/* Resource Manager Modal */
.rm-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.5);
  padding: 20px;
}

.rm-modal {
  width: min(680px, 100%);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.rm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.rm-head h2 {
  font-size: 17px;
  margin: 0;
}

.rm-close {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 22px;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.rm-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.rm-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-bottom: 6px;
}

.rm-item:hover {
  background: var(--surface);
}

.rm-item.selected {
  background: rgba(0, 113, 227, 0.1);
  outline: 2px solid var(--accent);
}

.rm-thumb {
  width: 56px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
  display: grid;
  place-items: center;
}

.rm-thumb img,
.rm-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rm-icon {
  font-size: 20px;
}

.rm-info {
  flex: 1;
  min-width: 0;
}

.rm-info strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rm-info span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rm-path {
  font-family: monospace;
  color: var(--line);
}

.rm-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.rm-foot {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

.rm-upload-bar {
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.comment-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Profile page */
.profile-card {
  padding: 28px;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border);
}

.profile-bio {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.profile-stats {
  display: flex;
  margin-bottom: 12px;
  padding: 0;
}

.profile-stats span {
  font-size: 13px;
  color: var(--muted);
}

.profile-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0 20px;
}

.profile-stat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
}

.profile-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.profile-stat-body strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.profile-stat-body span {
  font-size: 12px;
  color: var(--muted);
}

.profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-edit {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border);
}

.comment-avatar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
}

.comment-name-preview {
  font-size: 13px;
  font-weight: 600;
}

.comment-content {
  margin: 8px 0 0;
  font-size: 15px;
}

.comment-foot {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-reply-btn {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--link);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.comment-foot .comment-like-btn {
  margin-left: auto;
}

.comment-reply-btn:hover {
  text-decoration: underline;
}

.comment-replies {
  margin-top: 12px;
  padding-left: 18px;
  border-left: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-collapse-toggle {
  display: inline-block;
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  color: var(--link);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.comment-collapse-toggle:hover {
  text-decoration: underline;
}

.comment-replies .comment-item {
  padding: 12px 16px;
}

.comment-reply-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
}

.comment-reply-cancel {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
}

.comment-reply {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  font-size: 14px;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.comment-form textarea {
  resize: vertical;
}

.comment-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.comment-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.comment-submit {
  padding: 10px 26px;
  border-radius: 980px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.comment-submit:hover {
  filter: brightness(1.08);
}

.comment-tip {
  color: var(--muted);
  font-size: 12px;
}

.status-line {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.status-line.ok {
  color: #248a3d;
}

[data-theme="dark"] .status-line.ok {
  color: #30d158;
}

.status-line.err {
  color: #e30000;
}

[data-theme="dark"] .status-line.err {
  color: #ff453a;
}

.prose figure {
  margin: 22px 0;
}

.prose video {
  width: 100%;
  border-radius: 14px;
}

.file-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
}

.file-link:hover {
  color: var(--link);
}

.featured-card,
.post-card,
.rail-card,
.album-card,
.aside-card,
.comment-item,
.comment-form,
.admin-card,
.home-comment-card {
  position: relative;
}

.featured-card::before,
.post-card::before,
.rail-card::before,
.album-card::before,
.aside-card::before,
.comment-item::before,
.comment-form::before,
.composer::before,
.moment-card::before,
.admin-card::before,
.home-comment-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 46%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.02));
  pointer-events: none;
  z-index: 1;
}

[data-theme="dark"] .featured-card::before,
[data-theme="dark"] .post-card::before,
[data-theme="dark"] .rail-card::before,
[data-theme="dark"] .album-card::before,
[data-theme="dark"] .aside-card::before,
[data-theme="dark"] .comment-item::before,
[data-theme="dark"] .comment-form::before,
[data-theme="dark"] .composer::before,
[data-theme="dark"] .moment-card::before,
[data-theme="dark"] .admin-card::before,
[data-theme="dark"] .home-comment-card::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
}

/* Gallery */
.gallery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.gallery-plus {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
}

.gallery-plus svg {
  width: 20px;
  height: 20px;
}

.gallery-plus:hover {
  filter: brightness(1.08);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.album-card {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.album-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.album-cover {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-2);
}

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

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

.album-cover-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-size: 13px;
}

.album-card-body {
  padding: 14px 18px 16px;
}

.album-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.album-card-title-row h3 {
  font-size: 16px;
  font-weight: 600;
}

.album-badge {
  flex: none;
  padding: 3px 10px;
  border-radius: 980px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.album-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.album-cover-link {
  display: block;
}

.album-menu-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.album-card:hover .album-menu-btn,
.album-menu-btn:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .album-menu-btn {
    opacity: 1;
  }
}

.album-menu-btn svg {
  width: 15px;
  height: 15px;
}

.album-menu-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.album-menu {
  position: absolute;
  z-index: 70;
  min-width: 150px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.album-menu button {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.album-menu button:hover {
  background: var(--surface-2);
}

.album-menu button.danger {
  color: #e30000;
}

[data-theme="dark"] .album-menu button.danger {
  color: #ff453a;
}

.album-view {
  margin-top: 8px;
}

.album-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.album-view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.album-view-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.album-meta {
  margin: 6px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.photo-item {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface-2);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.35s ease;
}

.photo-item img:hover {
  transform: scale(1.05);
}

.photo-del {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
}

.photo-del svg {
  width: 13px;
  height: 13px;
}

.photo-del:hover {
  background: var(--accent);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
}

.lightbox img {
  max-width: 90vw;
  max-height: 74vh;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 14px;
  color: #e5e5e5;
  font-size: 14px;
}

.lightbox-counter {
  margin-top: 4px;
  color: #9a9a9a;
  font-size: 12px;
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.lightbox-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

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

.lightbox-btn svg {
  width: 18px;
  height: 18px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 22px;
}

.lightbox-btn.playing .icon-play {
  display: none;
}

.lightbox-btn:not(.playing) .icon-pause {
  display: none;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.gallery-modal-card {
  width: min(440px, calc(100% - 48px));
  padding: 26px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--bg);
  box-shadow: var(--shadow-lg);
}

.gallery-modal-card h2 {
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 700;
}

/* Post nav */
.post-nav {
  padding-top: 0;
}

.post-nav-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.post-nav-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.post-nav-card:hover {
  background: var(--glass-strong);
}

.post-nav-card.next {
  text-align: right;
}

.post-nav-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.post-nav-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.back-band {
  padding-top: 0;
}

/* About page */
.about-page {
  padding-top: 0;
}

.about-page-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
}

.about-page-inner .prose {
  max-width: 640px;
}

.avatar-large {
  width: 120px;
  height: 120px;
  font-size: 44px;
}

/* Responsive */
@media (max-width: 900px) {
  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-media {
    min-height: 260px;
  }

  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .archive-row {
    grid-template-columns: 130px 1fr;
  }

  .archive-row-side {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }
}

@media (max-width: 720px) {
  .band {
    padding: 40px 0;
  }

  .intro {
    padding: 48px 0 40px;
  }

  .menu-btn {
    display: grid;
  }

  .btn-login {
    padding: 6px 14px;
    font-size: 12px;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link {
    padding: 12px 0;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .post-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .post-aside {
    position: static;
  }

  .comment-form-row {
    grid-template-columns: 1fr;
  }

  .rail-card {
    grid-template-columns: 1fr;
  }

  .rail-card-media {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .rail-card-body {
    padding: 24px 20px;
  }

  .featured-content {
    padding: 24px;
  }

  .about-inner,
  .about-page-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .post-nav-inner {
    grid-template-columns: 1fr;
  }

  .post-nav-card.next {
    text-align: left;
  }

  .archive-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    background: var(--glass-strong);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }

  .archive-thumb {
    border-radius: 10px;
  }

  .archive-row-side {
    grid-column: auto;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .timeline-item-meta {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Moments */
.moment-container {
  max-width: 860px;
  margin: 0 auto;
}

.composer,
.moment-card {
  display: flex;
  gap: 14px;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 120px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.composer {
  margin-bottom: 22px;
}

.moment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.composer-body,
.moment-body {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.composer textarea {
  width: 100%;
  min-height: 76px;
  border: none;
  background: transparent;
  resize: vertical;
  font: inherit;
  line-height: 1.6;
  color: var(--ink);
  outline: none;
}

.composer textarea::placeholder {
  color: var(--muted);
}

.composer-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.composer-bar .status-line {
  flex: 1;
  margin: 0;
}

.composer-preview {
  position: relative;
  margin-top: 10px;
  max-width: 260px;
}

.composer-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: none;
}

.composer-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.composer-thumb-video {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
}

.composer-thumb-video svg {
  width: 28px;
  height: 28px;
}

.composer-thumb-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
}

.composer-thumb-remove svg {
  width: 11px;
  height: 11px;
}

/* Moment media grid */
.moment-media-grid {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
}

.moment-media-1 { grid-template-columns: 1fr; }
.moment-media-2 { grid-template-columns: 1fr 1fr; }
.moment-media-3 { grid-template-columns: 1fr 1fr; }
.moment-media-4 { grid-template-columns: 1fr 1fr; }

.moment-media-3 .moment-media-item:first-child {
  grid-column: 1 / -1;
}

.moment-media-item {
  overflow: hidden;
  border-radius: 12px;
}

.moment-media-item img {
  width: 100%;
  height: 100%;
  max-height: 340px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.moment-media-1 .moment-media-item img {
  max-height: 420px;
}

.moment-media-2 .moment-media-item img,
.moment-media-3 .moment-media-item img,
.moment-media-4 .moment-media-item img {
  aspect-ratio: 1;
}

.moment-media-video video {
  width: 100%;
  max-height: 340px;
  display: block;
  border-radius: 12px;
  background: #000;
}

/* Site lightbox */
.site-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
}

.site-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
}

.site-lightbox-close,
.site-lightbox-nav {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.site-lightbox-close:hover,
.site-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.18);
}

.site-lightbox-close svg,
.site-lightbox-nav svg {
  width: 18px;
  height: 18px;
}

.site-lightbox-close {
  position: absolute;
  top: 20px;
  right: 22px;
}

.site-lightbox-prev {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.site-lightbox-next {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 560px) {
  .site-lightbox-prev { left: 8px; }
  .site-lightbox-next { right: 8px; }
}

/* About page extras */
.about-extras {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.about-subtitle {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 14px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 980px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.social-link svg {
  width: 18px;
  height: 18px;
}

.contrib-link {
  display: block;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  overflow-x: auto;
}

.contrib-link img {
  display: block;
  min-width: 640px;
  width: 100%;
  filter: none;
}

[data-theme="dark"] .contrib-link img {
  filter: invert(0.88) hue-rotate(180deg);
}

/* About contribution heatmap */
.contrib-wrap {
  position: relative;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  overflow-x: auto;
}

.contrib-cells {
  display: flex;
  gap: 2px;
  min-width: 680px;
}

.contrib-week {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contrib-day {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: var(--surface-2);
}

.contrib-day[data-level="1"] { background: #9be9a8; }
.contrib-day[data-level="2"] { background: #40c463; }
.contrib-day[data-level="3"] { background: #30a14e; }
.contrib-day[data-level="4"] { background: #216e39; }

[data-theme="dark"] .contrib-day[data-level="1"] { background: #0e4429; }
[data-theme="dark"] .contrib-day[data-level="2"] { background: #006d32; }
[data-theme="dark"] .contrib-day[data-level="3"] { background: #26a641; }
[data-theme="dark"] .contrib-day[data-level="4"] { background: #39d353; }

.contrib-day[data-tip] {
  cursor: default;
}

.contrib-tip {
  position: absolute;
  z-index: 100;
  padding: 4px 10px;
  border-radius: 980px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
}

/* Social icon */
.social-icon {
  width: 18px;
  height: 18px;
}

.social-icon-img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
}

/* Footer friend links */
.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.footer-gh {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover,
.footer-right a:hover {
  color: var(--accent);
}

.footer-sep {
  color: var(--line);
}

/* Comment parent hint */
.comment-parent-hint {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.moment-login-hint {
  text-align: center;
  margin: 0 0 18px;
}

.moment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.moment-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.moment-name {
  font-weight: 600;
}

.moment-time {
  color: var(--muted);
  font-size: 13px;
}

.moment-delete {
  margin-left: auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.moment-edit-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.moment-delete svg,
.moment-edit-btn svg {
  width: 15px;
  height: 15px;
}

.moment-delete:hover {
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.12);
}

.moment-edit-btn:hover {
  color: var(--accent);
  background: rgba(0, 113, 227, 0.12);
}

.moment-text {
  margin: 6px 0 0;
  line-height: 1.7;
  word-break: break-word;
}

.moment-image {
  display: block;
  margin-top: 10px;
}

.moment-image img {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 14px;
}

.moment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.moment-actions .moment-delete {
  margin-left: auto;
}

.moment-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.moments-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.moments-band-copy p {
  margin: 6px 0 0;
  color: var(--muted);
}

.moment-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 980px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.moment-action-btn svg {
  width: 15px;
  height: 15px;
}

.moment-action-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.moment-like-btn.liked {
  color: #ff2d55;
  border-color: rgba(255, 45, 85, 0.45);
  background: rgba(255, 45, 85, 0.1);
}

.moment-share-btn {
  position: relative;
}

.moment-share-btn.copied::after {
  content: '已复制链接';
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 980px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  pointer-events: none;
}

@media (max-width: 560px) {
  .moment-avatar {
    width: 38px;
    height: 38px;
  }

  .composer,
 .moment-card {
   padding: 14px;
   gap: 10px;
 }
}
/* Home latest comments */
.home-comment-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-comment-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.home-comment-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  line-height: 1.65;
  color: var(--ink);
}

.home-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.home-comment-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.home-comment-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Comment like button */
.comment-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 980px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.comment-like-btn svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.comment-like-btn.liked {
  color: #ff2d55;
  border-color: rgba(255, 45, 85, 0.45);
  background: rgba(255, 45, 85, 0.1);
}

.comment-like-btn.liked svg {
  color: #ff2d55;
}

/* Moment comments panel */
.moment-comments {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--glass-border);
}

.moment-comment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.moment-comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.moment-comment-form input,
.moment-comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.moment-comment-form input:focus,
.moment-comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.moment-comment-form textarea {
  resize: vertical;
  min-height: 60px;
}

.moment-comment-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.moment-comment-foot .status-line {
  margin: 0;
}

.moment-comment-foot .comment-submit {
  padding: 8px 18px;
}

.moment-comment-item .comment-foot {
  margin-top: 6px;
}

.moment-comment-item .comment-replies {
  margin-top: 8px;
  padding-left: 14px;
}

@media (max-width: 560px) {
  .home-comment-card {
    padding: 14px;
  }
}

/* Search page */
.search-bar-wrap {
  margin-bottom: 28px;
}

.search-bar-wrap input {
  width: 100%;
  padding: 14px 20px;
  border: 1px solid var(--glass-border);
  border-radius: 980px;
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.search-bar-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.search-hit {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  margin-bottom: 12px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.search-hit:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.search-hit-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.search-hit-type {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-hit-date {
  font-size: 12px;
  color: var(--muted);
}

.search-hit h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.4;
}

.search-hit p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

/* Moment head delete/edit icons right-aligned */
.moment-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.moment-head .moment-delete {
  margin-left: auto;
}

/* Archive 科创网风格 */
.archive-group {
  margin-bottom: 32px;
}

.archive-group-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.archive-cat-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
  border-radius: 14px;
  margin-bottom: 6px;
}

.archive-cat-row:hover {
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.archive-cat-head,
.archive-latest,
.archive-cat-info {
  position: relative;
  z-index: 2;
}

/* Post card author */
.post-card-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  margin-right: 10px;
}

.post-card-author:hover {
  color: var(--accent);
}

.post-card-author-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

[data-theme="light"] .post-card-author-img {
  filter: invert(1);
}

.archive-cat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--glass-border);
}

.archive-cat-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.archive-cat-info {
  flex: 1;
  min-width: 0;
}

.archive-cat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.archive-cat-head strong {
  font-size: 16px;
  font-weight: 700;
}

.archive-cat-count {
  font-size: 13px;
  color: var(--muted);
}

.archive-cat-new {
  padding: 2px 8px;
  border-radius: 980px;
  background: rgba(255, 45, 85, 0.12);
  color: #ff2d55;
  font-size: 11px;
  font-weight: 600;
}

.archive-latest {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.archive-latest-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.archive-latest-item:hover {
  color: var(--accent);
}

.archive-latest-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.archive-latest-date {
  flex-shrink: 0;
  font-size: 12px;
}

.archive-empty {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

/* Archive glass card */
.glass-card {
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.archive-row.glass-card {
  padding: 16px;
  margin-bottom: 10px;
}

.archive-tag-link {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 980px;
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
}

.archive-tag-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.archive-tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.archive-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.archive-filter-label {
  color: var(--muted);
  font-size: 14px;
}

/* Category page */
.cat-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.cat-page-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.cat-page-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--glass-border);
  background: var(--glass);
}

.cat-page-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-page-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 4px;
}

.cat-page-back {
  flex-shrink: 0;
}

/* Archive post grid (same as homepage) */
.archive-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .archive-post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .archive-post-grid {
    grid-template-columns: 1fr;
  }
}

/* Moment edit area */
.moment-edit-area textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  resize: vertical;
  outline: none;
}

.moment-edit-area textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.moment-edit-media {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.moment-edit-media-item {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.moment-edit-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.moment-edit-media-item button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.moment-edit-upload {
  margin-top: 8px;
}

/* Comment device tag */
.comment-device {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

/* Comment like button alignment */
.comment-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.comment-foot .comment-like-btn {
  margin-left: auto;
}
