/*
 * Manbo site experience layer
 * Loaded after the production bundle so existing features stay untouched.
 */

:root {
  --ux-paper: #fffdfb;
  --ux-paper-soft: #fff8fa;
  --ux-ink: #352b31;
  --ux-ink-soft: #675861;
  --ux-ink-muted: #806f78;
  --ux-rose: #d85f86;
  --ux-rose-deep: #a93f64;
  --ux-rose-pale: #fbe9ef;
  --ux-sage: #52786e;
  --ux-sage-pale: #e8f1ed;
  --ux-gold: #a86f27;
  --ux-line: rgba(130, 80, 100, 0.14);
  --ux-shadow: 0 18px 48px rgba(95, 49, 69, 0.09);
  --ux-shadow-small: 0 8px 24px rgba(95, 49, 69, 0.07);
}

html {
  max-width: 100%;
  overflow-x: clip;
  scroll-padding-top: 92px;
}

body {
  max-width: 100%;
  color: var(--ux-ink);
  overflow-x: clip;
}

body ::selection {
  color: var(--ux-rose-deep);
  background: #f8cad9;
}

.skip-link:focus-visible,
.navbar a:focus-visible,
.navbar button:focus-visible,
.tag-btn:focus-visible,
.post-card:focus-visible,
.ux-recent-card:focus-visible,
.ux-empty-actions a:focus-visible,
.ux-to-top:focus-visible,
.ux-privacy-dismiss:focus-visible,
.ux-privacy-footer-link:focus-visible {
  outline: 3px solid rgba(216, 95, 134, 0.5);
  outline-offset: 3px;
}

.main-content {
  min-width: 0;
  max-width: 100%;
}

.navbar {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 32px rgba(85, 39, 59, 0.1);
}

.nav-right a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 3px;
}

.nav-right a::after {
  bottom: 4px;
}

.hamburger {
  width: 44px;
  height: 44px;
}

.mobile-menu-content {
  background: rgba(255, 251, 252, 0.98);
}

.mobile-menu-content a,
.mobile-menu-content button {
  min-height: 46px;
}

.mobile-menu-header button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
}

#oml2d-statusBar {
  display: none !important;
}

body[data-manbo-route="post"] #oml2d-canvas,
body[data-manbo-route="post"] #oml2d-tips,
body[data-manbo-route="post"] #oml2d-statusBar,
body[data-manbo-route="blog"] #oml2d-canvas,
body[data-manbo-route="blog"] #oml2d-tips {
  display: none !important;
}

#oml2d-tips {
  border: 1px solid rgba(216, 95, 134, 0.2) !important;
  border-radius: 14px !important;
  background: rgba(255, 253, 251, 0.96) !important;
  color: var(--ux-ink) !important;
  box-shadow: var(--ux-shadow-small) !important;
}

/* Shared editorial surfaces */

.post-card,
.post-body,
.toc,
.contact-card,
.archive-page,
.about-page,
.friends-page,
.radar-card,
.link-card,
.ai-card {
  border: 1px solid var(--ux-line);
  box-shadow: var(--ux-shadow-small);
}

.post-card,
.post-body,
.toc,
.contact-card {
  background-color: var(--ux-paper);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(216, 95, 134, 0.025) 0 1px, transparent 1.4px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 250, 0.94));
  background-size: 16px 16px, 100% 100%;
}

#main-content .post-card,
#main-content .post-body,
#main-content .toc,
#main-content .contact-card {
  border: 1px solid var(--ux-line);
  background-color: var(--ux-paper);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(216, 95, 134, 0.025) 0 1px, transparent 1.4px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 250, 0.95));
  background-size: 16px 16px, 100% 100%;
  box-shadow: var(--ux-shadow-small);
}

.post-card {
  border-radius: 16px;
  box-shadow: var(--ux-shadow);
}

.post-card::before {
  opacity: 0.42;
}

.post-card:hover {
  box-shadow: 0 22px 52px rgba(95, 49, 69, 0.13);
}

.post-title,
.post-summary {
  overflow-wrap: anywhere;
}

.post-summary {
  color: var(--ux-ink-soft);
}

.post-date,
.post-meta,
.views {
  color: var(--ux-ink-muted);
}

.page-title,
.blog-header h2,
.radar-header h2,
.nav-header h2,
.page-header h2 {
  color: var(--ux-ink);
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.82);
}

.page-desc,
.blog-header p,
.radar-header p,
.nav-header p,
.page-header p {
  color: var(--ux-ink-soft);
}

#main-content .blog-header .page-title,
#main-content .radar-header .page-title,
#main-content .nav-header .page-title,
#main-content .page-header > h2,
#main-content .page-header .header-content > h2 {
  color: var(--ux-rose-deep) !important;
  background: none !important;
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.82);
  -webkit-text-fill-color: var(--ux-rose-deep) !important;
}

/* Blog discovery */

#main-content > .blog-page {
  width: min(1080px, 100%);
  max-width: 1080px;
  padding-top: 56px;
}

.blog-header {
  margin-bottom: 24px;
}

.search-bar {
  min-height: 46px;
  border: 1px solid var(--ux-line);
  background: rgba(255, 253, 251, 0.92);
}

.tag-filters {
  margin-bottom: 30px;
}

.tag-btn {
  min-height: 38px;
  border-color: rgba(168, 93, 121, 0.12);
  background: rgba(255, 251, 252, 0.9);
  box-shadow: 0 4px 14px rgba(95, 49, 69, 0.05);
}

@media (pointer: coarse) {
  .tag-btn,
  .ux-section-link {
    min-height: 44px;
  }
}

.tag-btn[hidden] {
  display: none !important;
}

.tag-btn.active {
  background: linear-gradient(135deg, #d85f86, #bd5d8b 58%, #9873ad);
}

.blog-page .post-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

#main-content .blog-page .post-list > .post-card:first-child {
  grid-column: 1 / -1;
  padding: 30px 32px;
}

#main-content .blog-page .post-list > .post-card:first-child .post-title {
  max-width: 920px;
  font-size: 1.2rem;
}

#main-content .blog-page .post-list > .post-card:first-child .post-summary {
  max-width: 840px;
  font-size: 0.91rem;
}

#main-content .blog-page .post-list > .post-card {
  min-width: 0;
  height: 100%;
  padding: 22px 24px;
}

#main-content .blog-page .post-list > .post-card .post-header {
  gap: 10px;
}

#main-content .blog-page .post-list > .post-card .post-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.55;
}

#main-content .blog-page .post-list > .post-card .post-summary {
  display: -webkit-box;
  min-height: 3.4em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#main-content .blog-page .post-list > .post-card .post-footer {
  margin-top: 16px;
}

/* Home continues below the hero instead of ending at one viewport. */

.ux-home-recent {
  position: relative;
  padding: 68px 24px 76px;
  color: var(--ux-ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(216, 95, 134, 0.08), transparent 30%),
    radial-gradient(circle at 92% 82%, rgba(82, 120, 110, 0.07), transparent 28%),
    linear-gradient(180deg, #fffafb 0%, #fffdfb 52%, #fff8fa 100%);
  border-top: 1px solid rgba(168, 93, 121, 0.1);
}

.ux-home-recent::before {
  position: absolute;
  top: -1px;
  left: 50%;
  width: min(1120px, calc(100% - 48px));
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(216, 95, 134, 0.42), transparent);
  transform: translateX(-50%);
}

.ux-home-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.ux-section-topline {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 26px;
}

.ux-section-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--ux-sage);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.ux-kicker-dot {
  width: 8px;
  height: 8px;
  background: var(--ux-sage);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(82, 120, 110, 0.1);
}

.ux-section-heading {
  margin: 0;
  color: var(--ux-ink);
  font-family: var(--font-display, serif);
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ux-section-subtitle {
  max-width: 600px;
  margin: 8px 0 0;
  color: var(--ux-ink-soft);
  font-size: 0.92rem;
  line-height: 1.75;
}

.ux-section-link {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 17px;
  color: var(--ux-rose-deep);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(168, 93, 121, 0.18);
  border-radius: 999px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.ux-section-link:hover {
  background: #fff;
  box-shadow: var(--ux-shadow-small);
  transform: translateY(-2px);
}

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

.ux-recent-card {
  display: flex;
  min-width: 0;
  min-height: 260px;
  padding: 23px;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(136, 89, 108, 0.14);
  border-radius: 14px;
  box-shadow: var(--ux-shadow-small);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.ux-recent-card:hover {
  border-color: rgba(216, 95, 134, 0.28);
  box-shadow: var(--ux-shadow);
  transform: translateY(-4px);
}

.ux-recent-card-inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.ux-recent-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
  color: var(--ux-ink-muted);
  font-size: 0.74rem;
}

.ux-recent-index {
  color: var(--ux-rose);
  font-family: Georgia, serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ux-recent-date {
  font-variant-numeric: tabular-nums;
}

.ux-recent-title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 12px;
  color: var(--ux-ink);
  font-family: var(--font-display, serif);
  font-size: 1.03rem;
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ux-recent-summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 18px;
  color: var(--ux-ink-soft);
  font-size: 0.84rem;
  line-height: 1.72;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ux-recent-footer {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
}

.ux-recent-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.ux-recent-tag {
  padding: 4px 9px;
  color: var(--ux-sage);
  font-size: 0.69rem;
  font-weight: 600;
  background: var(--ux-sage-pale);
  border-radius: 999px;
}

.ux-recent-read {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 5px;
  align-items: center;
  color: var(--ux-rose-deep);
  font-size: 0.74rem;
  font-weight: 650;
}

.ux-recent-skeleton {
  min-height: 260px;
  border-radius: 14px;
  background:
    linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.82) 38%, transparent 56%) 0 0 / 220% 100%,
    #f7eef1;
  animation: ux-shimmer 1.5s ease-in-out infinite;
}

.ux-recent-error {
  display: flex;
  grid-column: 1 / -1;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  padding: 20px 22px;
  color: var(--ux-ink-soft);
  background: rgba(255, 255, 255, 0.78);
  border: 1px dashed rgba(168, 93, 121, 0.24);
  border-radius: 14px;
}

/* Useful empty states instead of dead ends. */

.ux-native-empty {
  display: none !important;
}

.ux-empty-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  width: min(790px, calc(100% - 32px));
  margin: 8px auto 64px;
  padding: 28px;
  color: var(--ux-ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(255, 248, 250, 0.95));
  border: 1px solid var(--ux-line);
  border-radius: 18px;
  box-shadow: var(--ux-shadow);
}

.ai-page > .ux-empty-panel {
  width: min(790px, 100%);
  margin-top: 22px;
}

.ux-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  color: var(--ux-rose-deep);
  background: var(--ux-rose-pale);
  border-radius: 16px;
}

.ux-empty-content h2 {
  margin: 3px 0 8px;
  color: var(--ux-ink);
  font-family: var(--font-display, serif);
  font-size: 1.18rem;
}

.ux-empty-content p {
  max-width: 620px;
  margin: 0;
  color: var(--ux-ink-soft);
  font-size: 0.9rem;
  line-height: 1.8;
}

.ux-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ux-empty-actions a {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  color: var(--ux-rose-deep);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(168, 93, 121, 0.2);
  border-radius: 999px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.ux-empty-actions a:first-child {
  color: #fff;
  background: var(--ux-rose);
  border-color: var(--ux-rose);
}

.ux-empty-actions a:hover {
  box-shadow: var(--ux-shadow-small);
  transform: translateY(-2px);
}

/* Article reading surface */

.post-page {
  width: 100%;
  max-width: 1120px;
  min-width: 0;
}

.post-layout,
.post-main {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.post-body {
  min-width: 0;
  max-width: 100%;
  border-radius: 18px;
}

#main-content .post-body > h1 {
  color: var(--ux-rose-deep) !important;
  text-shadow: 0 1px 0 #fff;
  background: none !important;
  animation: none;
  -webkit-text-fill-color: var(--ux-rose-deep) !important;
}

#main-content .post-body > h1::after {
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 16px;
  content: "";
  background: linear-gradient(90deg, var(--ux-rose), #dcaac0 60%, transparent);
  border-radius: 999px;
}

.meta {
  color: var(--ux-ink-soft);
  background: var(--ux-rose-pale);
}

.post-tags .tag {
  color: var(--ux-rose-deep);
  background: var(--ux-paper-soft);
}

.toc {
  color: var(--ux-ink-soft);
  border-radius: 15px;
}

.toc-title {
  color: var(--ux-rose-deep);
}

.content {
  min-width: 0;
  max-width: 100%;
  color: #41343b;
  font-size: 1rem;
  line-height: 1.96;
  overflow-wrap: anywhere;
}

.content > h1:first-child {
  display: none;
}

.content h1,
.content h2,
.content h3,
.content h4 {
  color: #783f56;
  text-shadow: 0 1px 0 #fff;
}

.content h2 {
  margin-top: 1.8em;
  border-image: linear-gradient(90deg, var(--ux-rose), #d9b8c8 54%, transparent) 1;
}

.content h3::before {
  color: var(--ux-rose);
}

.content p,
.content li {
  color: #43363d;
}

.content blockquote {
  color: #5e4a54;
  background: linear-gradient(135deg, #fff0f5 0%, #f2eef8 100%);
}

.content pre {
  max-width: 100%;
  overscroll-behavior-inline: contain;
  box-shadow: 0 16px 34px rgba(42, 22, 37, 0.2);
}

.content code:not(pre code) {
  overflow-wrap: anywhere;
}

.content img {
  height: auto;
  max-width: 100%;
}

.ux-table-scroll {
  width: 100%;
  max-width: 100%;
  margin: 1.2em 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--ux-line);
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}

.ux-table-scroll .content-table,
.ux-table-scroll table {
  min-width: 620px;
  margin: 0;
  border: 0;
}

.back-btn,
.copy-link-btn,
.content .copy-btn {
  min-height: 40px;
}

.comment-section {
  min-width: 0;
  max-width: 100%;
}

.contact-card {
  overflow-wrap: anywhere;
}

/* Music gets out of the reading column on small screens. */

@media (max-width: 768px) {
  .blog-page {
    padding-top: 34px;
  }

  .blog-page .post-list {
    grid-template-columns: minmax(0, 1fr);
  }

  #main-content .blog-page .post-list > .post-card:first-child {
    grid-column: auto;
    padding: 22px;
  }

  #main-content .blog-page .post-list > .post-card:first-child .post-title {
    font-size: 1.04rem;
  }

  .post-layout {
    align-items: stretch;
  }

  .post-main {
    flex: none;
    width: 100%;
  }

  .toc {
    order: -1;
    width: 100%;
    max-height: min(32vh, 250px) !important;
    margin-bottom: 2px;
    padding: 15px 16px;
  }

  .toc-title {
    margin-bottom: 9px;
  }

  .post-body {
    padding: 25px 20px;
    border-radius: 15px;
  }

  .post-body > h1 {
    font-size: 1.55rem;
  }

  .ux-home-recent {
    padding: 48px 18px 64px;
  }

  .ux-section-topline {
    align-items: flex-start;
  }

  .ux-section-link {
    min-height: 40px;
    padding: 0 13px;
  }

  .ux-recent-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ux-recent-card {
    min-height: 0;
    padding: 21px;
  }

  .ux-recent-summary {
    -webkit-line-clamp: 2;
  }

  .ux-empty-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 48px;
    padding: 23px 20px;
  }
}

@media (max-width: 600px) {
  .music-player-wrapper {
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  .mini-player[data-v-4c297b6a] {
    width: 48px;
    height: 48px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .mini-player[data-v-4c297b6a] .album-art {
    display: none;
  }

  .mini-player[data-v-4c297b6a] .song-mini-info {
    display: none;
  }

  .mini-play-btn[data-v-4c297b6a] {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 253, 251, 0.9);
    box-shadow: 0 9px 26px rgba(95, 49, 69, 0.22);
  }

  .post-page {
    padding: 25px 12px 40px;
  }

  .post-layout {
    gap: 16px;
  }

  .post-body {
    padding: 22px 16px;
  }

  .post-body > h1 {
    font-size: 1.38rem;
    line-height: 1.5;
  }

  .content {
    font-size: 0.96rem;
    line-height: 1.9;
  }

  .content h2 {
    font-size: 1.2rem;
  }

  .content h3 {
    font-size: 1.03rem;
  }

  .ux-section-topline {
    display: block;
  }

  .ux-section-link {
    margin-top: 16px;
  }

  .ux-empty-actions {
    flex-direction: column;
  }

  .ux-empty-actions a {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .post-page {
    padding-right: 10px;
    padding-left: 10px;
  }

  .post-body {
    padding-right: 14px;
    padding-left: 14px;
  }

  .ux-home-recent {
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (max-width: 1150px) and (min-width: 769px) {
  .blog-page .post-list {
    grid-template-columns: minmax(0, 1fr);
  }

  #main-content .blog-page .post-list > .post-card:first-child {
    grid-column: auto;
  }
}

/* Back-to-top control stays above the compact music player. */

.ux-to-top {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 190;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ux-rose-deep);
  cursor: pointer;
  visibility: hidden;
  background: rgba(255, 253, 251, 0.95);
  border: 1px solid rgba(168, 93, 121, 0.2);
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(95, 49, 69, 0.16);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.ux-to-top.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.ux-to-top:hover {
  color: #fff;
  background: var(--ux-rose);
}

@media (max-width: 600px) {
  .ux-to-top {
    right: 14px;
    bottom: 76px;
    width: 44px;
    height: 44px;
  }
}

/* A dismissible privacy note keeps the disclosure available without interrupting reading. */

.ux-privacy-announcement {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 10001;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: start;
  width: min(440px, calc(100vw - 48px));
  max-height: min(48vh, 340px);
  padding: 18px;
  overflow: auto;
  color: var(--ux-ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 249, 0.97));
  border: 1px solid rgba(168, 93, 121, 0.2);
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(75, 37, 53, 0.2);
  animation: ux-privacy-in 240ms ease-out both;
}

.ux-privacy-announcement[hidden] {
  display: none;
}

.ux-privacy-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--ux-sage);
  background: var(--ux-sage-pale);
  border-radius: 10px;
}

.ux-privacy-copy {
  min-width: 0;
}

.ux-privacy-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--ux-rose-deep);
  font-size: 0.7rem;
  font-weight: 700;
}

.ux-privacy-copy h2 {
  margin: 0 0 7px;
  color: var(--ux-ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 1rem;
  line-height: 1.35;
}

.ux-privacy-copy p {
  margin: 0;
  color: var(--ux-ink-soft);
  font-size: 0.78rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.ux-privacy-dismiss {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--ux-ink-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
}

.ux-privacy-dismiss:hover {
  color: var(--ux-rose-deep);
  background: var(--ux-rose-pale);
  border-color: var(--ux-line);
}

.ux-privacy-footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 5px auto 0;
  padding: 0 12px;
  color: var(--ux-ink-muted);
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
}

.ux-privacy-footer-link:hover {
  color: var(--ux-rose-deep);
  border-color: var(--ux-line);
}

@media (max-width: 600px) {
  .ux-privacy-announcement {
    right: 12px;
    bottom: 82px;
    left: 12px;
    grid-template-columns: 34px minmax(0, 1fr) 42px;
    width: auto;
    max-height: 42vh;
    padding: 14px;
  }

  .ux-privacy-icon {
    width: 34px;
    height: 34px;
  }

  .ux-privacy-copy h2 {
    font-size: 0.94rem;
  }

  .ux-privacy-copy p {
    font-size: 0.75rem;
  }
}

/* Dark appearance retains the same hierarchy without bright paper glare. */

body.dark {
  --ux-paper: #251d24;
  --ux-paper-soft: #2e232b;
  --ux-ink: #f4e7ec;
  --ux-ink-soft: #d1bdc6;
  --ux-ink-muted: #ad96a1;
  --ux-line: rgba(255, 184, 207, 0.12);
  --ux-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  --ux-shadow-small: 0 8px 24px rgba(0, 0, 0, 0.18);
  --ux-rose-pale: #3b2632;
  --ux-sage-pale: #23352f;
}

body.dark .post-card,
body.dark .post-body,
body.dark .toc,
body.dark .contact-card,
body.dark .ux-recent-card,
body.dark .ux-empty-panel,
body.dark .ux-section-link,
body.dark .tag-btn {
  background-color: var(--ux-paper);
  background-image: none;
  border-color: var(--ux-line);
}

body.dark #main-content .post-card,
body.dark #main-content .post-body,
body.dark #main-content .toc,
body.dark #main-content .contact-card {
  background-color: var(--ux-paper) !important;
  background-image: none !important;
  border-color: var(--ux-line);
}

body.dark .ux-home-recent {
  background:
    radial-gradient(circle at 8% 12%, rgba(216, 95, 134, 0.1), transparent 30%),
    linear-gradient(180deg, #1b1319 0%, #21171e 54%, #1b1319 100%);
  border-top-color: rgba(255, 184, 207, 0.1);
}

body.dark .page-title,
body.dark .blog-header h2,
body.dark .radar-header h2,
body.dark .nav-header h2,
body.dark .page-header h2,
body.dark .ux-section-heading,
body.dark .ux-recent-title,
body.dark .ux-empty-content h2 {
  color: var(--ux-ink);
  text-shadow: none;
}

body.dark #main-content .blog-header .page-title,
body.dark #main-content .radar-header .page-title,
body.dark #main-content .nav-header .page-title,
body.dark #main-content .page-header > h2,
body.dark #main-content .page-header .header-content > h2 {
  color: #f4b2ca !important;
  text-shadow: none;
  -webkit-text-fill-color: #f4b2ca !important;
}

body.dark #main-content .post-body > h1 {
  color: #ff9fc1;
  text-shadow: none;
  -webkit-text-fill-color: #ff9fc1 !important;
}

body.dark .content,
body.dark .content p,
body.dark .content li {
  color: #dbcbd2;
}

body.dark .content h1,
body.dark .content h2,
body.dark .content h3,
body.dark .content h4 {
  color: #f2afc8;
  text-shadow: none;
}

body.dark .content blockquote {
  color: #d4bfc9;
  background: linear-gradient(135deg, rgba(80, 42, 59, 0.8), rgba(52, 39, 70, 0.74));
}

body.dark .ux-empty-icon {
  color: #ff9fc1;
  background: #3b2632;
}

body.dark .ux-empty-actions a {
  color: #ffc0d5;
  background: #30242b;
  border-color: var(--ux-line);
}

body.dark .ux-empty-actions a:first-child {
  color: #fff;
  background: #c65279;
  border-color: #c65279;
}

body.dark .ux-to-top {
  color: #ffc0d5;
  background: rgba(38, 28, 35, 0.96);
  border-color: var(--ux-line);
}

body.dark .ux-privacy-announcement {
  background: linear-gradient(135deg, rgba(43, 31, 39, 0.99), rgba(35, 27, 33, 0.99));
  border-color: var(--ux-line);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.4);
}

body.dark .ux-privacy-copy h2 {
  color: var(--ux-ink);
}

body.dark .ux-privacy-dismiss:hover {
  color: #ffc0d5;
  background: #3b2632;
}

body.dark .ux-recent-skeleton {
  background:
    linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.05) 38%, transparent 56%) 0 0 / 220% 100%,
    #30242b;
}

/* Keep dynamic feed cards inside their grid tracks, including long source URLs. */

.radar-page {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.radar-grid,
.skeleton-grid {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.radar-grid > *,
.skeleton-grid > * {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.radar-card {
  min-width: 0;
  overflow: hidden;
}

.radar-card *,
.radar-grid > * {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.radar-card .feed-title,
.radar-card .feed-summary {
  max-width: 100%;
  white-space: normal;
}

.radar-card .card-top {
  min-width: 0;
}

.radar-card .source-badge {
  max-width: 72%;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

@media (max-width: 480px) {
  .radar-grid,
  .skeleton-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A static, privacy-safe fallback is used only when the Live2D canvas is malformed. */

#oml2d-canvas {
  transform: none !important;
  rotate: none !important;
  scale: none !important;
}

#oml2d-stage.manbo-live2d-fallback-active #oml2d-canvas,
#oml2d-stage.manbo-live2d-fallback-active #oml2d-tips {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#manbo-live2d-static-fallback {
  position: absolute;
  inset: 0;
  z-index: 9998;
  overflow: hidden;
  pointer-events: none;
}

#manbo-live2d-static-fallback img {
  position: absolute;
  left: 50%;
  bottom: -60px;
  width: 145%;
  max-width: none;
  height: auto;
  filter: drop-shadow(0 16px 28px rgba(155, 70, 105, 0.16));
  transform: translateX(-50%);
  user-select: none;
}

/* Data Saver and reduced-motion modes avoid distracting motion and overlays. */

html.manbo-lite #oml2d-canvas,
html.manbo-lite #oml2d-tips,
html.manbo-lite #oml2d-statusBar,
html.manbo-lite .petal-canvas,
html.manbo-lite .fx-canvas,
html.manbo-lite .meteor-canvas {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .ux-recent-skeleton {
    animation: none;
  }

  .ux-recent-card,
  .ux-section-link,
  .ux-empty-actions a,
  .ux-to-top,
  .ux-privacy-announcement {
    transition: none;
    animation: none;
  }
}

@keyframes ux-shimmer {
  to {
    background-position: -220% 0, 0 0;
  }
}

@keyframes ux-privacy-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
