:root {
  --bg: #fffaf8;
  --bg-warm: #fff6fb;
  --bg-cool: #f4f7ff;
  --card: rgba(255, 255, 255, 0.76);
  --card-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(161, 139, 221, 0.18);
  --line-strong: rgba(161, 139, 221, 0.3);
  --ink: #2e2440;
  --ink-soft: #6c627f;
  --ink-faint: #958aa8;
  --primary: #9d7cff;
  --primary-strong: #7d58f0;
  --primary-soft: #efe8ff;
  --accent: #86cbff;
  --accent-soft: #edf8ff;
  --rose: #ffb1d0;
  --peach: #ffd8c5;
  --shadow-soft: 0 22px 55px rgba(132, 108, 183, 0.1);
  --shadow-card: 0 28px 70px rgba(132, 108, 183, 0.14);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --content-width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 205, 231, 0.86), transparent 34%),
    radial-gradient(circle at top right, rgba(162, 217, 255, 0.58), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 48%, #fdfcff 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  filter: blur(48px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: 2.5rem;
  right: -5rem;
  width: 20rem;
  height: 20rem;
  background: rgba(157, 124, 255, 0.18);
}

body::after {
  left: -5rem;
  bottom: -3rem;
  width: 18rem;
  height: 18rem;
  background: rgba(134, 203, 255, 0.16);
}

a {
  color: inherit;
}

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

audio {
  width: 100%;
  min-width: 13rem;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(var(--content-width), calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.shell-post {
  width: min(980px, calc(100vw - 32px));
}

.hero,
.dashboard-card,
.post-card,
.post-article,
.nav-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: #6d57bf;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 38px;
  align-items: center;
  padding: 40px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 246, 251, 0.82)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.72));
}

.hero-copy {
  display: grid;
  gap: 16px;
  align-content: start;
}

.hero h1,
.post-header h1 {
  margin: 0;
  font-family: "Iowan Old Style", "Songti SC", "STSong", serif;
  font-size: clamp(3rem, 5.6vw, 5rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.tagline {
  margin: 0;
  color: #594c72;
  font-size: clamp(1.08rem, 2vw, 1.26rem);
  font-weight: 700;
}

.intro,
.dashboard-card p,
.post-summary,
.post-card p,
.section-head p,
.calendar-head p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.8;
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.button.primary {
  background: linear-gradient(135deg, var(--primary), #b088ff);
  color: #fff;
  box-shadow: 0 16px 30px rgba(157, 124, 255, 0.22);
}

.voice-chip {
  max-width: 280px;
}

.hero-art {
  position: relative;
  min-height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait {
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.portrait-backdrop {
  width: min(100%, 470px);
  aspect-ratio: 5 / 5.3;
  padding: 20px;
  border-radius: 36px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 242, 255, 0.84));
}

.portrait-backdrop img,
.portrait-avatar img,
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-backdrop img {
  object-fit: contain;
  object-position: center bottom;
  border-radius: 28px;
}

.post-cover img,
.post-cover-large img {
  width: 100%;
  height: 100%;
}

.post-cover img {
  object-fit: cover;
  object-position: center 20%;
}

.post-cover-large img {
  object-fit: contain;
  object-position: center center;
}

.portrait-avatar {
  position: absolute;
  right: 18px;
  bottom: -8px;
  width: 98px;
  height: 98px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(121, 107, 170, 0.18);
}

.portrait-avatar img {
  border-radius: 999px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
  gap: 24px;
  align-items: start;
  margin-top: 26px;
}

.status-rail {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 22px;
}

.dashboard-card {
  padding: 26px;
  border-radius: var(--radius-lg);
}

.clock-card {
  display: grid;
  gap: 14px;
  align-content: start;
}

.clock-card h2,
.calendar-head h2,
.section-head h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Songti SC", "STSong", serif;
  font-size: clamp(1.95rem, 3vw, 2.45rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.stat-item {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 245, 255, 0.84));
}

.stat-item.wide {
  grid-column: span 2;
}

.stat-label {
  color: var(--ink-faint);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-item strong {
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.calendar-card {
  display: grid;
  gap: 16px;
}

.calendar-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.calendar-head p {
  max-width: 9.5rem;
  text-align: right;
}

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

.calendar-weekdays span {
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: 0.82rem;
  font-weight: 700;
}

.calendar-day {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 18px;
  border: 1px solid rgba(161, 139, 221, 0.16);
  background: rgba(255, 255, 255, 0.74);
  color: #615677;
}

.calendar-day.empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.34);
}

.calendar-day.has-update {
  border-color: rgba(157, 124, 255, 0.42);
  background: linear-gradient(180deg, rgba(239, 232, 255, 1), rgba(246, 241, 255, 0.97));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.75),
    0 10px 18px rgba(157, 124, 255, 0.08);
}

.calendar-day.is-today {
  outline: 2px solid rgba(134, 203, 255, 0.42);
  outline-offset: 3px;
}

.day-number {
  font-size: 0.96rem;
  font-weight: 700;
}

.day-dot {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-strong), #b189ff);
  box-shadow: 0 0 0 3px rgba(157, 124, 255, 0.12);
}

.latest-section {
  display: grid;
  gap: 18px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-head p {
  max-width: 15rem;
  text-align: right;
}

.post-feed {
  display: grid;
  gap: 16px;
}

.post-card {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
}

.post-card.empty {
  text-align: center;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-faint);
  font-size: 0.92rem;
}

.post-meta.single {
  justify-content: flex-start;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #486e96;
  font-size: 0.78rem;
  font-weight: 700;
}

.post-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  gap: 18px;
  align-items: start;
}

.post-copy {
  display: grid;
  gap: 14px;
}

.post-copy h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Songti SC", "STSong", serif;
  font-size: clamp(1.7rem, 2.2vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.post-copy h3 a,
.back-link,
.text-link {
  text-decoration: none;
}

.post-copy h3 a:hover,
.back-link:hover,
.text-link:hover {
  color: var(--primary-strong);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 2px;
}

.text-link,
.back-link {
  font-weight: 700;
}

.post-cover {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 235, 246, 0.64));
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding: 0 10px;
  color: #8b82a0;
  font-size: 0.94rem;
}

.post-article {
  display: grid;
  gap: 24px;
  padding: 34px;
  border-radius: var(--radius-xl);
}

.post-header {
  display: grid;
  gap: 16px;
}

.post-summary {
  max-width: 40rem;
}

.post-voice {
  max-width: 420px;
}

.post-cover-large {
  margin: 0;
  overflow: hidden;
  border-radius: 30px;
  aspect-ratio: 16 / 7.4;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 236, 246, 0.7));
}

.markdown-body {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 10px 0 2px;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #3e3550;
  line-height: 1.95;
  font-size: 1.05rem;
}

.markdown-body > * {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  font-family: "Iowan Old Style", "Songti SC", "STSong", serif;
  line-height: 1.15;
  margin-top: 1.65em;
  margin-bottom: 0.7em;
}

.markdown-body h2 {
  font-size: 2rem;
}

.markdown-body h3 {
  font-size: 1.45rem;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote,
.markdown-body pre {
  margin-bottom: 1.05em;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.35rem;
}

.markdown-body blockquote {
  padding: 16px 18px;
  border-left: 4px solid var(--primary);
  border-radius: 0 18px 18px 0;
  background: rgba(157, 124, 255, 0.08);
  color: #5e5377;
}

.markdown-body code {
  padding: 0.14rem 0.42rem;
  border-radius: 8px;
  background: rgba(134, 203, 255, 0.12);
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 0.92em;
}

.markdown-body pre {
  overflow: auto;
  padding: 18px;
  border-radius: 20px;
  background: #261f35;
  color: #faf6ff;
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.markdown-body img {
  margin-top: 22px;
  margin-bottom: 22px;
  border-radius: 22px;
  box-shadow: 0 18px 38px rgba(121, 107, 170, 0.14);
}

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

.gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 18px 34px rgba(121, 107, 170, 0.12);
}

.post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.nav-card {
  display: block;
  padding: 18px 20px;
  border-radius: 22px;
  text-decoration: none;
}

.nav-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-faint);
  font-size: 0.88rem;
}

.nav-card strong {
  font-size: 1.02rem;
  line-height: 1.35;
}

@media (max-width: 980px) {
  .hero,
  .home-grid,
  .post-body {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 300px;
  }

  .status-rail {
    position: static;
  }

  .section-head,
  .calendar-head,
  .footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .section-head p,
  .calendar-head p {
    text-align: left;
    max-width: none;
  }

  .post-cover {
    max-width: 320px;
  }
}

@media (max-width: 720px) {
  .shell,
  .shell-post {
    width: min(100vw - 20px, 100%);
    padding-top: 10px;
  }

  .hero,
  .dashboard-card,
  .post-card,
  .post-article {
    padding: 20px;
  }

  .hero h1,
  .post-header h1 {
    font-size: 2.5rem;
  }

  .portrait-avatar {
    right: 12px;
    bottom: 12px;
    width: 92px;
    height: 92px;
  }

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

  .calendar-weekdays,
  .calendar-grid {
    gap: 8px;
  }

  .calendar-day {
    min-height: 42px;
    border-radius: 14px;
  }

  .post-cover-large {
    aspect-ratio: 4 / 3;
  }

  .markdown-body {
    font-size: 1rem;
  }
}
