/* 雾中书桌 - global theme */
:root {
  --bg-image: url("assets/bg-mist-morning.jpg");
  --backdrop-opacity: 0.78;
  --backdrop-blur: 18px;
  --backdrop-surface: rgba(238, 247, 243, var(--backdrop-opacity));
  --text-over-image: #242827;
  --text-over-image-soft: #3d4543;
  --text-over-image-muted: #606a67;
  --text-shadow-over-image: 0 2px 8px rgba(16, 31, 29, 0.9), 0 0 24px rgba(16, 31, 29, 0.46);
  --text-shadow-over-image-soft: 0 2px 7px rgba(16, 31, 29, 0.82), 0 0 18px rgba(16, 31, 29, 0.36);
  --panel-opacity: 0.82;
  --panel-blur: 12px;
  --panel-surface: rgba(238, 247, 243, var(--panel-opacity));
  --content-width: 1100px;
  --ink: #173b3a;
  --ink-soft: #52706d;
  --ink-faint: #7d9a96;
  --accent: #2f8f7f;
  --accent-deep: #1d6f63;
  --accent-soft: #9fd6c8;
  --warm: #e0a83f;
  --danger: #c65d52;
  --line: rgba(23, 59, 58, 0.14);
  --line-light: rgba(255, 255, 255, 0.62);
  --surface-mist: var(--panel-surface);
  --surface-mist-strong: rgba(255, 255, 255, 0.68);
  --shadow-soft: 0 18px 45px rgba(23, 55, 52, 0.16);
  --shadow-lift: 0 22px 55px rgba(23, 55, 52, 0.24);
  --radius-bubble: 22px;
  --radius-card: 12px;
  --font-display: "LXGW WenKai", "Noto Serif SC", "Songti SC", "STSong", "Microsoft YaHei", serif;
  --font-body: "LXGW WenKai", "Noto Serif SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "Cascadia Code", "Consolas", "SFMono-Regular", "Courier New", monospace;
}

/* Background-image text legibility */
.site-header .brand-title {
  color: var(--text-over-image);
  font-weight: 800;
  letter-spacing: 0.025em;
  text-shadow: var(--text-shadow-over-image);
}

.site-header .brand-sub {
  color: var(--text-over-image-muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: var(--text-shadow-over-image-soft);
}

.site-nav .nav-bubble {
  color: var(--text-over-image);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: var(--text-shadow-over-image);
}

.site-nav .nav-bubble:hover,
.site-nav .nav-bubble:focus-visible,
.site-nav .nav-bubble.active {
  color: #111716;
}

.page-shell > main:not(.admin-main) > .page-head h1,
.page-shell > main:not(.admin-main) > .page-head p,
.page-shell > main:not(.admin-main) > .page-head .eyebrow,
.page-shell > main:not(.admin-main) .section-header h2,
.page-shell > main:not(.admin-main) .section-header .eyebrow,
.page-shell > main:not(.admin-main) .board-head h2,
.page-shell > main:not(.admin-main) .board-head .eyebrow,
.page-shell > main:not(.admin-main) .board-count,
.page-shell > main:not(.admin-main) .gallery-title,
.page-shell > main:not(.admin-main) .gallery-title span,
.page-shell > main:not(.admin-main) .gallery-board-head h2,
.page-shell > main:not(.admin-main) .gallery-board-head span,
.page-shell > main:not(.admin-main) .post-header .post-title,
.page-shell > main:not(.admin-main) .profile-section h2,
.page-shell > main:not(.admin-main) .content-section h3,
.page-shell > main:not(.admin-main) .contact-section h3 {
  color: var(--text-over-image);
  font-weight: 800;
  letter-spacing: 0.025em;
  text-shadow: var(--text-shadow-over-image);
}

.page-shell > main:not(.admin-main) > .page-head p,
.page-shell > main:not(.admin-main) .board-count,
.page-shell > main:not(.admin-main) .gallery-title,
.page-shell > main:not(.admin-main) .gallery-board-head span,
.page-shell > main:not(.admin-main) .bio,
.page-shell > main:not(.admin-main) .content-section p,
.page-shell > main:not(.admin-main) .contact-section p {
  color: var(--text-over-image-soft);
  font-weight: 600;
  letter-spacing: 0.018em;
  text-shadow: var(--text-shadow-over-image-soft);
}

.page-shell > main:not(.admin-main) .markdown-content,
.page-shell > main:not(.admin-main) .post-content article {
  color: var(--text-over-image-soft);
  font-weight: 600;
  letter-spacing: 0.018em;
  text-shadow: var(--text-shadow-over-image-soft);
}

.page-shell > main:not(.admin-main) .markdown-content h2,
.page-shell > main:not(.admin-main) .post-content article h2,
.page-shell > main:not(.admin-main) .markdown-content h3,
.page-shell > main:not(.admin-main) .post-content article h3 {
  color: var(--text-over-image);
  font-weight: 800;
  letter-spacing: 0.025em;
  text-shadow: var(--text-shadow-over-image);
}

.page-shell > main:not(.admin-main) .post-header .post-meta,
.page-shell > main:not(.admin-main) .post-header .post-tags,
.page-shell > main:not(.admin-main) .post-header .tag {
  color: var(--text-over-image-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-shadow: var(--text-shadow-over-image-soft);
}

.site-footer,
.site-footer p {
  color: var(--text-over-image-muted);
  font-weight: 600;
  text-shadow: var(--text-shadow-over-image-soft);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  background-color: #dcebe6;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.backdrop-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--backdrop-surface);
  -webkit-backdrop-filter: blur(var(--backdrop-blur)) saturate(1.12);
  backdrop-filter: blur(var(--backdrop-blur)) saturate(1.12);
}

::selection {
  background: rgba(224, 168, 63, 0.35);
  color: #0e2f2d;
}

/* Layout */
.page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  display: block;
  padding: 0 24px 48px;
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100vw;
  max-width: none;
  margin: 0 0 24px calc(50% - 50vw);
  padding: 14px clamp(24px, 4vw, 56px);
  background: var(--panel-surface);
  border: 0;
  border-bottom: 1px solid var(--line-light);
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: blur(var(--panel-blur)) saturate(1.08);
  backdrop-filter: blur(var(--panel-blur)) saturate(1.08);
}

.site-header .brand {
  flex: 0 0 auto;
  margin-left: clamp(28px, 8vw, 132px);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.site-header .brand:hover {
  transform: none;
  box-shadow: none;
}

.site-header .brand-mark {
  display: none;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: clamp(10px, 1.6vw, 24px);
  min-width: 0;
}

.site-nav .nav-bubble {
  padding: 9px 14px;
  white-space: nowrap;
}

.sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  grid-area: sidebar;
  flex-direction: column;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface-mist);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-bubble);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(var(--panel-blur));
  backdrop-filter: blur(var(--panel-blur));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  font-family: var(--font-display);
  font-size: 1.15rem;
  box-shadow: 0 8px 22px rgba(47, 143, 127, 0.28);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.brand-sub {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.bubble-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-bubble {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 9px 14px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  transition: color 0.2s ease;
}

.nav-bubble:hover,
.nav-bubble:focus-visible {
  color: var(--accent-deep);
  background: transparent;
  border: 0;
  transform: none;
  box-shadow: none;
  outline: none;
}

.nav-bubble.active {
  color: var(--accent-deep);
  background: transparent;
  border: 0;
  box-shadow: none;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 7px;
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px 16px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.6;
  background: var(--surface-mist);
  border: 1px solid var(--line-light);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(var(--panel-blur));
  backdrop-filter: blur(var(--panel-blur));
}

.sidebar-foot strong {
  color: var(--ink);
}

.glass-panel {
  min-width: 0;
  width: min(100%, var(--content-width));
  max-width: var(--content-width);
  grid-area: main;
  justify-self: center;
  margin: 24px auto 0;
  padding: clamp(24px, 4.5vw, 52px);
  background: var(--panel-surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-bubble);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(var(--panel-blur)) saturate(1.08);
  backdrop-filter: blur(var(--panel-blur)) saturate(1.08);
  overflow: hidden;
}

.glass-panel:only-child {
  grid-column: 1 / -1;
}

.page-shell > main.glass-panel {
  width: min(calc(100% - clamp(128px, 30vw, 720px)), 1380px);
  max-width: 1380px;
  grid-area: auto;
  justify-self: center;
  margin: 24px auto 0;
  padding: clamp(24px, 4.5vw, 52px) 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  overflow: visible;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--warm);
  border-radius: 2px;
}

.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.2;
  letter-spacing: 0;
}

.page-head p {
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.site-footer {
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.85rem;
  text-align: center;
}

/* Buttons & tags */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  outline: none;
}

.btn:active {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}

.btn-warm {
  color: #35250d;
  background: linear-gradient(135deg, #f0c360, var(--warm));
}

.btn-secondary {
  color: var(--ink);
  background: var(--surface-mist-strong);
  border-color: var(--line);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #d47367, var(--danger));
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  color: var(--accent-deep);
  background: rgba(159, 214, 200, 0.36);
  border: 1px solid rgba(47, 143, 127, 0.22);
  font-size: 0.76rem;
  font-weight: 600;
}

.tag-warm {
  color: #6b4d13;
  background: rgba(240, 195, 96, 0.32);
  border-color: rgba(224, 168, 63, 0.3);
}

.tag-danger {
  color: #7d352d;
  background: rgba(198, 93, 82, 0.2);
  border-color: rgba(198, 93, 82, 0.3);
}

/* Home */
.hero-section {
  padding: 10px 0 38px;
}

.hero-section h2 {
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.25;
}

.hero-section p {
  max-width: 54ch;
  margin: 16px 0 24px;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
}

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

.filter-btn {
  padding: 8px 17px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-mist);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.filter-btn:hover,
.filter-btn:focus-visible {
  color: var(--accent-deep);
  border-color: rgba(47, 143, 127, 0.4);
  transform: translateY(-2px);
  outline: none;
}

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

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px 20px;
  align-items: start;
  padding-top: 26px;
}

.category-stack {
  display: grid;
  gap: 46px;
}

.category-board .posts-grid {
  padding-top: 22px;
}

.board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.board-head h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
}

.board-count {
  color: var(--ink-faint);
  font-size: 0.82rem;
  white-space: nowrap;
}

.empty-board {
  min-height: 150px;
  display: grid;
  place-items: center;
  margin-top: 22px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.22);
}

.ai-art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.ai-art-card {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  color: var(--ink-soft);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.ai-art-card.empty,
.ai-art-add {
  border-style: dashed;
}

.ai-art-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 143, 127, 0.5);
  background: rgba(255, 255, 255, 0.58);
}

.ai-art-symbol {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ai-art-card p {
  font-size: 0.86rem;
}

.ai-art-add {
  color: var(--ink-soft);
  text-decoration: none;
}

/* AI art gallery */
.ai-art-page .gallery-stage {
  width: min(100%, 1520px);
  max-width: 100%;
  margin: 18px auto 0;
  padding: clamp(28px, 4vw, 56px) 24px 42px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  overflow: visible;
}

.ai-art-page .page-head {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 28px;
  max-width: 900px;
  margin: 0 auto 20px;
  text-align: center;
}

.ai-art-page .page-head p {
  max-width: 44ch;
}

.photo-gallery {
  padding-top: 8px;
}

.gallery-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 26px;
  color: var(--ink-faint);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
}

.gallery-title span {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0;
}

.photo-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 570px;
  margin: 0 auto 24px;
  padding: 42px 18px 76px;
  overflow-x: auto;
  overflow-y: hidden;
  perspective: 1400px;
  scrollbar-color: rgba(23, 59, 58, 0.25) transparent;
  scrollbar-width: thin;
}

.photo-frame {
  position: relative;
  z-index: var(--z);
  flex: 0 0 clamp(220px, 23vw, 310px);
  width: clamp(220px, 23vw, 310px);
  margin-left: clamp(-58px, -3.8vw, -22px);
  padding: 10px 10px 24px;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  background: rgba(255, 253, 247, 0.94);
  border: 11px solid rgba(255, 255, 255, 0.94);
  border-radius: 3px;
  box-shadow: 0 24px 45px rgba(23, 55, 52, 0.24), inset 0 0 0 1px rgba(23, 59, 58, 0.08);
  transform: rotate(var(--tilt)) translateY(var(--lift));
  transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0.3s ease;
}

.photo-frame:first-child {
  margin-left: 0;
}

.photo-frame::after {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 72px;
  height: 22px;
  background: rgba(227, 190, 126, 0.58);
  opacity: 0.74;
  transform: translateX(-50%) rotate(-1.5deg);
}

.photo-frame:hover,
.photo-frame:focus-visible {
  z-index: 20;
  outline: none;
  transform: rotate(0deg) translateY(0) scale(1.045);
  box-shadow: 0 34px 60px rgba(23, 55, 52, 0.32), inset 0 0 0 1px rgba(47, 143, 127, 0.14);
}

.photo-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  filter: saturate(1.1) contrast(1.04);
}

.photo-frame figcaption,
.photo-frame-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 88px;
  padding-top: 18px;
  font-family: var(--font-display);
}

.photo-frame figcaption span,
.photo-frame-add > span:not(.photo-add-mark) {
  font-weight: 700;
  font-size: 1.02rem;
}

.photo-frame figcaption small,
.photo-frame-add small {
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.76rem;
}

.photo-frame-add {
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  background: rgba(255, 253, 247, 0.78);
  border-style: dashed;
}

.photo-frame-add::after {
  display: none;
}

.photo-add-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-family: var(--font-body);
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(47, 143, 127, 0.25);
}

.gallery-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(34px, 5vw, 72px) clamp(20px, 3vw, 44px);
  width: min(100%, 1320px);
  margin: 0 auto 26px;
}

.gallery-board {
  min-width: 0;
}

.gallery-board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.gallery-board-head h2 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0;
}

.gallery-board-head span {
  color: var(--ink-faint);
  font-size: 0.78rem;
}

.pinned-stack {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 430px;
  overflow: visible;
  perspective: 1100px;
}

.pinned-photo {
  position: absolute;
  z-index: var(--z);
  width: min(72%, 238px);
  margin: 0;
  padding: 8px 8px 20px;
  color: var(--ink);
  text-align: center;
  background: rgba(255, 253, 247, 0.95);
  border: 9px solid rgba(255, 255, 255, 0.95);
  border-radius: 2px;
  box-shadow: 0 22px 40px rgba(23, 55, 52, 0.23), inset 0 0 0 1px rgba(23, 59, 58, 0.08);
  transform: rotate(var(--r)) translate(var(--x), var(--y));
  transform-origin: 50% 45%;
  transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0.3s ease;
}

.pinned-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 0;
  filter: saturate(1.08) contrast(1.03);
}

.pinned-photo figcaption {
  min-height: 48px;
  padding-top: 14px;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.pinned-photo .pin {
  position: absolute;
  z-index: 2;
  top: -3px;
  left: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff4cf 0 11%, #b87934 13% 42%, #6f4521 45% 100%);
  box-shadow: 0 4px 8px rgba(32, 28, 18, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.65);
  transform: translate(-50%, -42%);
}

.pinned-photo .pin::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
}

.pinned-photo:hover,
.pinned-photo:focus-within {
  z-index: 20;
  box-shadow: 0 32px 58px rgba(23, 55, 52, 0.3), inset 0 0 0 1px rgba(47, 143, 127, 0.16);
  transform: rotate(0deg) translate(0, 0) scale(1.05);
}

.gallery-board-add {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 430px;
  color: var(--ink-soft);
  text-align: center;
  text-decoration: none;
  border: 1px dashed rgba(47, 143, 127, 0.44);
  background: rgba(255, 255, 255, 0.14);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.gallery-board-add:hover,
.gallery-board-add:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-4px);
}

.gallery-board-add .add-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 0;
}

.gallery-board-add .photo-add-mark {
  margin-bottom: 12px;
}

.gallery-board-add > .add-stack > span:not(.photo-add-mark) {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
}

.gallery-board-add small {
  color: var(--ink-faint);
  font-size: 0.78rem;
}

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

@media (max-width: 640px) {
  .gallery-board-grid {
    grid-template-columns: 1fr;
  }

  .pinned-stack,
  .gallery-board-add {
    min-height: 380px;
  }
}

.post-card {
  position: relative;
  min-height: 260px;
  margin-top: 10px;
  background: var(--panel-surface);
  border: 9px solid rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  box-shadow: 0 18px 38px rgba(23, 55, 52, 0.18), inset 0 0 0 1px rgba(23, 59, 58, 0.08);
  overflow: visible;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.post-card::before {
  content: "";
  position: absolute;
  top: -31px;
  left: 50%;
  width: 2px;
  height: 31px;
  background: linear-gradient(to bottom, rgba(23, 59, 58, 0.24), rgba(23, 59, 58, 0.02));
  transform: translateX(-50%);
}

.post-card::after {
  content: "";
  position: absolute;
  top: -36px;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0c360, #c98b2d);
  box-shadow: 0 3px 8px rgba(23, 55, 52, 0.24);
  transform: translateX(-50%);
}

.post-card:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  border-color: rgba(255, 255, 255, 0.92);
  background: var(--surface-mist-strong);
  box-shadow: 0 24px 48px rgba(23, 55, 52, 0.24), inset 0 0 0 1px rgba(47, 143, 127, 0.18);
}

.post-card:nth-child(even):hover {
  transform: translateY(-6px) rotate(0.4deg);
}

.post-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 210px;
  padding: 10px 6px 4px;
  color: inherit;
  text-decoration: none;
}

.post-badge {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.post-title {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 1.28rem;
  line-height: 1.4;
}

.post-summary {
  color: var(--ink-soft);
  font-size: 0.93rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.8rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.add-new-post-card {
  display: flex;
  min-height: 210px;
  border: 1px dashed rgba(47, 143, 127, 0.5);
  background: rgba(159, 214, 200, 0.14);
}

.add-new-post-card:hover {
  border-color: var(--accent);
  background: rgba(159, 214, 200, 0.22);
}

.add-new-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 26px;
  color: var(--ink-soft);
  text-decoration: none;
  text-align: center;
}

.plus-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(47, 143, 127, 0.25);
}

.add-new-link h3 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.add-new-link p {
  margin-top: 5px;
  font-size: 0.86rem;
}

/* Post detail & about */
.post-header {
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.post-header .post-title {
  margin: 14px 0 12px;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

.markdown-content,
.post-content article {
  color: #21433f;
  font-size: 1.02rem;
  line-height: 1.9;
}

.markdown-content h2,
.post-content article h2 {
  margin: 34px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--ink);
}

.markdown-content h3,
.post-content article h3 {
  margin: 26px 0 12px;
  font-family: var(--font-display);
  font-size: 1.22rem;
  color: var(--ink);
}

.markdown-content p,
.post-content article p {
  margin-bottom: 16px;
  text-align: justify;
}

.markdown-content ul,
.markdown-content ol,
.post-content article ul,
.post-content article ol {
  margin: 14px 0 20px;
  padding-left: 24px;
}

.markdown-content li,
.post-content article li {
  margin-bottom: 7px;
}

.markdown-content blockquote,
.post-content article blockquote {
  margin: 26px 0;
  padding: 16px 22px;
  border-left: 4px solid var(--warm);
  border-radius: 0 12px 12px 0;
  background: rgba(240, 195, 96, 0.16);
  color: var(--ink-soft);
  font-style: italic;
}

.markdown-content img,
.post-content article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.nav-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 36px;
}

.about-content {
  display: grid;
  gap: 28px;
}

.profile-section {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  align-items: center;
  padding: 8px 0 30px;
  border-bottom: 1px solid var(--line);
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 18px 38px rgba(47, 143, 127, 0.3);
}

.avatar-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.profile-section h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.bio {
  color: var(--ink-soft);
}

.content-section,
.contact-section {
  padding: 8px 0;
}

.content-section h3,
.contact-section h3 {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 1.28rem;
}

.topics-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.topics-list li {
  padding: 12px 16px;
  background: var(--surface-mist);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}

.contact-links {
  display: grid;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: var(--ink);
  background: var(--surface-mist);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-card);
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-item:hover,
.contact-item:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(47, 143, 127, 0.42);
  box-shadow: var(--shadow-soft);
  outline: none;
}

.contact-item .icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

/* Editor */
.editor-container {
  display: flex;
  flex-direction: column;
  min-height: min(760px, calc(100vh - 150px));
}

.editor-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 16px;
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.input-group input,
.input-group select,
.appearance input[type="text"],
.appearance input[type="url"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-mist-strong);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.input-group input:focus,
.input-group select:focus,
.appearance input[type="text"]:focus,
.appearance input[type="url"]:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 143, 127, 0.14);
}

.tags-container {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 30px;
}

.tag .remove {
  cursor: pointer;
  font-weight: 700;
  padding-left: 3px;
  opacity: 0.72;
}

.tag .remove:hover {
  opacity: 1;
}

.editor-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex: 1;
  min-height: 440px;
}

.editor-pane,
.preview-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--surface-mist);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-card);
  box-shadow: 0 10px 28px rgba(23, 55, 52, 0.08);
}

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.38);
}

.toolbar {
  display: flex;
  gap: 6px;
}

.tool-btn {
  min-width: 34px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-mist-strong);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tool-btn:hover,
.tool-btn:focus-visible {
  color: var(--accent-deep);
  border-color: var(--accent);
  background: #fff;
  transform: translateY(-2px);
  outline: none;
}

.editor-pane textarea {
  flex: 1;
  resize: none;
  min-height: 0;
  padding: 18px;
  border: none;
  outline: none;
  color: var(--ink);
  background: rgba(250, 253, 251, 0.72);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.7;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

.preview-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: rgba(250, 253, 251, 0.72);
}

.preview-content h1 {
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: 1.9rem;
}

.preview-content h2 {
  margin: 22px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.preview-content h3 {
  margin: 18px 0 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.preview-content p {
  margin-bottom: 13px;
}

.preview-content blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--warm);
  border-radius: 0 10px 10px 0;
  background: rgba(240, 195, 96, 0.16);
  font-style: italic;
}

.editor-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

/* Appearance manager */
.appearance {
  display: grid;
  gap: 30px;
}

.setting-block {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.setting-block:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.setting-block h2 {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.preset-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 104px;
  padding: 12px;
  border-radius: var(--radius-card);
  border: 2px solid transparent;
  color: #fff;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 26px rgba(23, 55, 52, 0.14);
  cursor: pointer;
  overflow: hidden;
  font: inherit;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.preset-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 42, 40, 0.05), rgba(20, 42, 40, 0.52));
  pointer-events: none;
}

.preset-card span {
  position: relative;
  z-index: 1;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.preset-card:hover,
.preset-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  outline: none;
}

.preset-card.active {
  border-color: var(--warm);
  box-shadow: 0 0 0 4px rgba(224, 168, 63, 0.2), var(--shadow-lift);
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.control-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.control-group output {
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.appearance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--accent-deep);
  background: rgba(159, 214, 200, 0.3);
  font-size: 0.86rem;
  font-weight: 600;
}

.status-line::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Motion */
.fade-in {
  animation: riseIn 0.65s cubic-bezier(0.22, 0.68, 0.35, 1) both;
}

.nav-bubble,
.post-card,
.brand,
.preset-card,
.btn,
.filter-btn,
.tool-btn {
  -webkit-tap-highlight-color: transparent;
}

.click-ripple {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: rgba(47, 143, 127, 0.3);
  transform: scale(0);
  pointer-events: none;
  animation: ripple 0.55s ease-out forwards;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ripple {
  to {
    transform: scale(5);
    opacity: 0;
  }
}

/* Home overview */
.home-layout {
  width: min(calc(100% - clamp(128px, 30vw, 720px)), 1380px);
  max-width: 1380px;
  margin: 28px auto 0;
  padding: clamp(16px, 4vw, 40px) 0 18px;
}

.home-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: clamp(16px, 2vw, 24px);
  align-items: stretch;
  margin-bottom: 24px;
}

.home-feature {
  position: relative;
  min-height: 260px;
  padding: clamp(24px, 4vw, 38px);
  overflow: hidden;
  background: var(--panel-surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-bubble);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(var(--panel-blur)) saturate(1.08);
  backdrop-filter: blur(var(--panel-blur)) saturate(1.08);
}

.home-feature::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -54px;
  bottom: -78px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(159, 214, 200, 0.32), rgba(159, 214, 200, 0));
  pointer-events: none;
}

.home-profile-intro {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.home-profile-avatar {
  display: grid;
  place-items: center;
  width: clamp(76px, 9vw, 104px);
  height: clamp(76px, 9vw, 104px);
  flex: 0 0 clamp(76px, 9vw, 104px);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
  box-shadow: 0 18px 38px rgba(47, 143, 127, 0.3);
}

.home-profile-identity {
  min-width: 0;
  flex: 1;
}

.home-profile-identity .eyebrow {
  margin-bottom: 8px;
}

.home-profile-identity h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.home-profile-signature {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.home-profile-bio {
  position: relative;
  z-index: 1;
  max-width: 58ch;
  margin-top: 28px;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.home-music-card {
  display: flex;
  flex-direction: column;
}

.home-music-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.home-music-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.home-music-head p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.home-music-disc {
  position: relative;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--warm) 0 4px, transparent 5px),
    repeating-radial-gradient(circle, #20403d 0 3px, #132f2d 4px 7px, #20403d 8px 11px);
  box-shadow: 0 16px 30px rgba(23, 55, 52, 0.26), inset 0 0 0 8px rgba(255, 255, 255, 0.08);
}

.home-music-disc::before {
  content: "";
  position: absolute;
  inset: 31px;
  border-radius: 50%;
  border: 2px solid rgba(224, 168, 63, 0.8);
}

.home-music-disc span {
  position: absolute;
  width: 3px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  transform-origin: bottom center;
  transform: rotate(34deg) translateY(-28px);
}

.home-music-card audio {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  margin: auto 0 20px;
  filter: saturate(0.9);
}

.home-music-card:not(.has-music) audio {
  display: none;
}

.home-music-card:not(.has-music) .home-music-disc {
  opacity: 0.55;
}

.home-music-hint {
  position: relative;
  z-index: 1;
  margin-top: auto;
  color: var(--ink-faint);
  font-size: 0.84rem;
}

.home-music-card.has-music .home-music-hint {
  display: none;
}

.home-bubble-grid {
  display: grid;
  grid-template-columns: 343px minmax(0, 1fr);
  grid-template-rows: minmax(240px, 1fr) 172px;
  gap: 18px;
  height: 462px;
  align-items: stretch;
}

.home-bubble {
  position: relative;
  min-height: 240px;
  padding: 22px;
  overflow: hidden;
  background: var(--panel-surface);
  background-position: center;
  background-size: cover;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-bubble);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(var(--panel-blur)) saturate(1.08);
  backdrop-filter: blur(var(--panel-blur)) saturate(1.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.home-bubble-essays {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 343px;
  height: 462px;
  min-height: 462px;
  max-height: 462px;
}

.home-bubble-tech {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  margin-top: 0;
}

.home-bubble-books {
  grid-column: 2;
  grid-row: 2;
  min-height: 0;
  margin-top: 0;
}

.home-bubble::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-soft));
  opacity: 0.72;
}

.home-bubble.has-custom-background {
  background-color: rgba(23, 59, 58, 0.42);
}

.home-bubble.has-custom-background::before {
  z-index: 1;
}

.home-bubble.has-custom-background::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, rgba(18, 35, 33, 0.52), rgba(18, 35, 33, 0.18));
  pointer-events: none;
}

.home-bubble.has-custom-background > * {
  position: relative;
  z-index: 1;
}

.home-bubble:hover,
.home-bubble:focus-within {
  transform: translateY(-5px);
  border-color: rgba(47, 143, 127, 0.34);
  box-shadow: var(--shadow-lift);
}

.home-bubble-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.home-bubble-head h2 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  line-height: 1.4;
}

.home-bubble p {
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.home-weekly-cover {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 116px;
  height: 100%;
}

.home-weekly-cover-image {
  flex: 0 0 auto;
  width: 72px;
  height: 92px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 20px rgba(18, 35, 33, 0.18);
}

.home-weekly-cover-placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, rgba(47, 143, 127, 0.86), rgba(92, 124, 111, 0.72));
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.home-weekly-cover-copy {
  min-width: 0;
}

.home-weekly-cover-title {
  margin-bottom: 7px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.22rem;
  line-height: 1.3;
}

.home-weekly-cover-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

.bubble-link {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  color: var(--accent-deep);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
}

.bubble-link::after {
  content: "→";
  margin-left: 8px;
  color: var(--warm);
  font-weight: 700;
}

.mini-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

/* Library front end */
.library-section {
  margin-top: 38px;
}

.library-section + .library-section {
  margin-top: 54px;
}

.weekly-book-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.weekly-book-item {
  padding: 18px;
  background: var(--surface-mist);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-card);
}

.weekly-book-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.weekly-book-author {
  margin-top: 4px;
  color: var(--accent-deep);
  font-size: 0.85rem;
  font-weight: 700;
}

.weekly-book-reason {
  margin: 12px 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.book-review-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
  align-items: start;
}

.book-review-card {
  padding: 20px;
  background: var(--surface-mist);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-bubble);
  box-shadow: var(--shadow-soft);
}

.review-book-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.review-book-head h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.review-book-head p {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.review-cover {
  width: 68px;
  height: 92px;
  flex: 0 0 68px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(23, 55, 52, 0.16);
}

.review-cover-placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.review-quote-list,
.mini-list .review-quote-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.review-quote {
  padding: 14px 16px;
  border-left: 3px solid var(--warm);
  border-radius: 0 10px 10px 0;
  background: rgba(240, 195, 96, 0.16);
}

.review-quote blockquote {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.98rem;
  line-height: 1.75;
}

.review-quote p {
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.library-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-card);
  color: var(--ink-faint);
  font-size: 0.86rem;
}

@media (max-width: 960px) {
  .home-hero-layout {
    grid-template-columns: 1fr;
  }

  .home-feature {
    min-height: 0;
  }

  .home-music-card audio {
    margin: 22px 0 18px;
  }

  .home-bubble-grid {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .home-bubble-essays,
  .home-bubble-tech,
  .home-bubble-books {
    grid-column: auto;
    grid-row: auto;
    width: auto;
    height: auto;
    max-height: none;
    min-height: 300px;
    margin-top: 0;
  }

  .home-bubble-books {
    min-height: 172px;
  }
}

@media (max-width: 640px) {
  .home-profile-intro,
  .home-bubble-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-bubble-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    height: auto;
  }

  .home-bubble-essays,
  .home-bubble-tech,
  .home-bubble-books {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
    margin-top: 0;
  }

  .home-music-head {
    align-items: flex-start;
  }

  .home-music-disc {
    width: 70px;
    height: 70px;
    flex-basis: 70px;
  }

  .weekly-book-list,
  .book-review-shelf {
    grid-template-columns: 1fr;
  }

  .home-bubble {
    min-height: 0;
  }
}

/* Responsive */
@media (max-width: 960px) {
  .page-shell {
    padding: 0 12px 36px;
  }

  .site-header {
    position: sticky;
    top: 0;
    flex-wrap: wrap;
    gap: 10px;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    padding: 12px 14px;
    border-radius: 0;
  }

  .site-header .brand {
    margin-left: 6px;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .brand {
    flex: 0 0 auto;
    padding: 12px 16px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .brand-sub {
    display: none;
  }

  .nav-bubble {
    flex: 0 0 auto;
    padding: 10px 15px;
    white-space: nowrap;
  }

  .sidebar-foot {
    display: none;
  }
}

@media (max-width: 700px) {
  .page-shell {
    width: 100%;
    padding: 0 8px 28px;
  }

  .site-header {
    top: 0;
    gap: 8px;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    padding: 10px 12px;
    border-radius: 0;
  }

  .site-nav .nav-bubble {
    padding: 9px 12px;
  }

  .glass-panel {
    margin-top: 14px;
    padding: 22px 16px;
    border-radius: 18px;
  }

  .page-head h1 {
    font-size: 2rem;
  }

  .editor-header {
    grid-template-columns: 1fr;
  }

  .editor-content {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .editor-pane,
  .preview-pane {
    height: 46vh;
    min-height: 300px;
  }

  .editor-footer,
  .appearance-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .profile-section {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

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

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 480px) {
  .brand-title {
    font-size: 1rem;
  }

  .nav-bubble {
    padding: 9px 12px;
    font-size: 0.86rem;
  }

  .post-card,
  .add-new-post-card {
    min-height: 190px;
  }
}

@media (max-width: 700px) {
  .page-shell > main.glass-panel {
    width: 100%;
    margin: 14px 0 0;
    padding: 22px 18px;
  }
}
