:root {
  --ink: #47384f;
  --muted: #8a7a92;
  --paper: #fff7fb;
  --panel: #ffffff;
  --line: #ead8ef;
  --accent: #ff7aa8;
  --accent-2: #42b9b0;
  --gold: #ffd166;
  --mint: #c7f6df;
  --sky: #c9e7ff;
  --charcoal: #5a4665;
  --shadow: 0 18px 42px rgba(154, 101, 154, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Comic Sans MS", "YouYuan", "Microsoft YaHei", cursive;
  background:
    linear-gradient(90deg, rgba(255, 122, 168, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(66, 185, 176, 0.08) 1px, transparent 1px),
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(255, 209, 102, 0.16) 18px 20px),
    var(--paper);
  background-size: 34px 34px, 34px 34px, auto, auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.app-shell.locked {
  display: none;
}

.admin-lock {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lock-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 122, 168, 0.2), transparent 42%),
    rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.lock-card .brand-mark {
  margin-bottom: 8px;
}

.lock-card h1 {
  font-size: clamp(34px, 6vw, 54px);
}

.lock-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.lock-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.lock-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  outline: 0;
}

.lock-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 122, 168, 0.15);
}

.lock-message {
  min-height: 20px;
  color: var(--accent);
  font-size: 13px;
}

.beian-link {
  justify-self: center;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

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

.rail {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 26px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), #ff9fc0);
  border-radius: 8px;
  font-size: 28px;
  font-weight: 700;
  box-shadow: 7px 7px 0 var(--gold);
  transform: rotate(-4deg);
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand small,
.eyebrow,
.list-toolbar p,
.stats-grid span,
.editor-foot,
.empty-state p {
  color: var(--muted);
  font-family: "Comic Sans MS", "YouYuan", "Microsoft YaHei", cursive;
}

.nav-list,
.chip-list,
.tag-cloud {
  display: grid;
  gap: 8px;
}

.nav-item,
.category-chip,
.tag-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 11px 12px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.nav-item:hover,
.category-chip:hover,
.tag-chip:hover,
.nav-item.active,
.category-chip.active,
.tag-chip.active {
  border-color: var(--line);
  background: #fff0f7;
}

.nav-item.active {
  color: var(--accent);
  box-shadow: inset 5px 0 0 var(--accent), 0 7px 18px rgba(255, 122, 168, 0.12);
}

.app-view {
  background: rgba(255, 209, 102, 0.18);
}

.app-view + .app-view {
  margin-bottom: 12px;
}

.nav-item b {
  color: var(--muted);
  font-size: 12px;
}

.side-section {
  margin-top: 28px;
}

.side-section.compact {
  padding-bottom: 20px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: "Comic Sans MS", "YouYuan", "Microsoft YaHei", cursive;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--accent);
  font-weight: 700;
}

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

.tag-chip {
  justify-content: center;
  padding: 8px;
  color: var(--accent-2);
  border-color: var(--line);
  background: rgba(199, 246, 223, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  padding: 30px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(32px, 4vw, 62px);
  line-height: 0.96;
  letter-spacing: 0;
  text-shadow: 3px 3px 0 rgba(255, 209, 102, 0.42);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 420px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 11px 15px;
  white-space: nowrap;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(145deg, var(--accent), #ff9fc0);
  border-color: #e85e92;
  box-shadow: 5px 5px 0 var(--gold);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--gold);
}

.secondary-btn {
  color: var(--accent-2);
  border-color: rgba(66, 185, 176, 0.34);
  background: rgba(201, 231, 255, 0.42);
}

.secondary-btn:hover {
  border-color: var(--accent-2);
  background: rgba(199, 246, 223, 0.65);
}

.ghost-btn {
  border-color: var(--line);
  background: var(--panel);
}

.ghost-btn.active {
  color: #fff;
  border-color: var(--accent);
  background: linear-gradient(145deg, var(--accent), #ff9fc0);
}

.danger-btn {
  color: var(--accent-2);
  border-color: rgba(255, 122, 168, 0.42);
  background: #fff0f7;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0;
}

.stats-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.stats-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.blog-view {
  margin-top: 28px;
}

.blog-hero {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 122, 168, 0.2), transparent 42%),
    linear-gradient(45deg, rgba(199, 246, 223, 0.7), rgba(255, 255, 255, 0.9));
  box-shadow: var(--shadow);
}

.blog-hero h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.95;
  text-shadow: 3px 3px 0 rgba(255, 209, 102, 0.42);
}

.blog-hero p:last-child {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.blog-posts,
.blog-reader {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.blog-posts {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
}

.blog-post-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.blog-post-card:hover,
.blog-post-card.active {
  border-color: var(--accent);
  background: #fff0f7;
}

.blog-post-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.2;
}

.blog-post-card p,
.blog-reader-meta {
  color: var(--muted);
  line-height: 1.55;
}

.blog-reader {
  min-height: 560px;
  padding: 26px;
}

.blog-reader h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1;
}

.blog-reader-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 12px 0 20px;
  font-size: 13px;
}

.blog-reader-content {
  line-height: 1.78;
}

.blog-reader-content.preview {
  min-height: 0;
  margin-top: 0;
  border: 0;
  padding: 0;
  background: transparent;
}

.public-blog-page {
  min-height: 100vh;
}

.public-blog-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 18px;
}

.public-blog-hero {
  min-height: 280px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-end;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 122, 168, 0.32), transparent 44%),
    linear-gradient(45deg, rgba(199, 246, 223, 0.82), rgba(255, 255, 255, 0.92));
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.public-blog-hero::after {
  content: "BLOG";
  position: absolute;
  right: 24px;
  top: 18px;
  color: rgba(255, 122, 168, 0.12);
  font-size: clamp(72px, 14vw, 160px);
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.public-blog-hero h1 {
  max-width: 900px;
}

.public-blog-hero p:last-child {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.public-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  gap: 10px;
  min-width: min(360px, 100%);
  position: relative;
  z-index: 1;
}

.public-hero-stats article {
  padding: 16px;
  border: 1px solid rgba(234, 216, 239, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
}

.public-hero-stats strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.public-hero-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.public-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
  gap: 14px;
  margin-top: 18px;
}

.featured-card {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(255, 209, 102, 0.5), transparent 35%),
    linear-gradient(135deg, #fff0f7, #ffffff 62%);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
}

.featured-card.large {
  grid-row: span 2;
  min-height: 454px;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 209, 102, 0.72), transparent 26%),
    radial-gradient(circle at 12% 88%, rgba(199, 246, 223, 0.9), transparent 28%),
    linear-gradient(135deg, #fff0f7, #ffffff 58%);
}

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

.featured-index {
  position: absolute;
  right: 16px;
  top: 10px;
  color: rgba(255, 122, 168, 0.22);
  font-size: 64px;
  font-weight: 900;
}

.featured-card h2 {
  margin: 4px 0 10px;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.05;
}

.featured-card p {
  color: var(--muted);
  line-height: 1.62;
}

.featured-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0;
  color: var(--accent-2);
  font-size: 13px;
}

.public-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.public-filter-bar h2 {
  margin: 0;
  font-size: 26px;
}

.public-tag-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.public-tag-filter button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--accent-2);
  background: #fff;
}

.public-tag-filter button.active,
.public-tag-filter button:hover {
  color: #fff;
  border-color: var(--accent);
  background: linear-gradient(145deg, var(--accent), #ff9fc0);
}

.public-tag-filter span {
  opacity: 0.72;
}

.public-blog-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.public-post-list,
.public-post-reader {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.public-post-list {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
}

.public-post-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.public-post-card:hover,
.public-post-card.active {
  transform: translateX(3px);
  border-color: var(--accent);
  background: #fff0f7;
}

.public-post-card span {
  color: var(--accent-2);
  font-size: 12px;
}

.public-post-card h2 {
  margin: 8px 0;
  font-size: 22px;
  line-height: 1.18;
}

.public-post-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
}

.public-post-reader {
  min-height: 640px;
  padding: clamp(22px, 4vw, 44px);
}

.public-reader-head {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.public-reader-head h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 70px);
  line-height: 0.96;
  text-shadow: 3px 3px 0 rgba(255, 209, 102, 0.42);
}

.public-post-reader .blog-reader-content {
  max-width: 780px;
}

.public-post-reader .blog-reader-content p {
  font-size: 18px;
}

.public-post-reader .blog-reader-content h1,
.public-post-reader .blog-reader-content h2,
.public-post-reader .blog-reader-content h3 {
  margin-top: 1.4em;
}

.public-empty {
  padding: 26px;
  color: var(--muted);
  text-align: center;
}

.reader-empty {
  display: grid;
  place-items: center;
  min-height: 520px;
}

.public-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.public-footer a {
  color: var(--accent-2);
  text-decoration: none;
}

.public-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding: 28px 4px 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
}

.site-footer a {
  width: 100%;
  color: var(--accent-2);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.note-list-panel,
.editor-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.note-list-panel {
  min-height: 620px;
  overflow: hidden;
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.list-toolbar h2 {
  margin: 0;
  font-size: 22px;
}

.list-toolbar p {
  margin: 4px 0 0;
  font-size: 13px;
}

select,
.meta-row input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 11px;
  background: #fff;
}

.note-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 288px);
  padding: 14px;
  overflow-y: auto;
}

.note-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease;
}

.note-card:hover,
.note-card.active {
  transform: translateX(3px);
  border-color: var(--accent);
}

.note-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.2;
}

.note-card p {
  display: -webkit-box;
  margin: 0 0 12px;
  color: var(--muted);
  font-family: "Comic Sans MS", "YouYuan", "Microsoft YaHei", cursive;
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.note-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-family: "Comic Sans MS", "YouYuan", "Microsoft YaHei", cursive;
  font-size: 12px;
}

.note-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--accent);
  background: rgba(255, 209, 102, 0.22);
}

.editor-panel {
  min-width: 0;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 620px;
  padding: 30px;
  text-align: center;
}

.empty-mark {
  font-size: 58px;
  color: var(--accent);
}

.empty-state h2 {
  margin: 8px 0 6px;
  font-size: 28px;
}

.empty-state p {
  max-width: 420px;
  margin: 0;
}

.editor-card {
  padding: 18px;
}

.editor-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.title-input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.04;
  font-weight: 700;
}

.editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.meta-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.meta-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-family: "Comic Sans MS", "YouYuan", "Microsoft YaHei", cursive;
  font-size: 13px;
}

.mode-tabs {
  display: inline-flex;
  margin-right: 10px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff0f7;
}

.tab {
  border: 0;
  border-radius: 6px;
  padding: 8px 16px;
  background: transparent;
}

.tab.active {
  color: #fff;
  background: var(--charcoal);
}

.markdown-tools {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  vertical-align: middle;
}

.markdown-tools button {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
}

.markdown-tools button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.writing-area {
  display: grid;
  gap: 12px;
}

.writing-area.split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.writing-area.split textarea,
.writing-area.split .preview {
  min-height: 560px;
}

textarea,
.preview {
  width: 100%;
  min-height: 430px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  line-height: 1.7;
  resize: vertical;
}

textarea {
  font-family: "Consolas", "Microsoft YaHei", monospace;
}

.preview {
  overflow-wrap: anywhere;
}

.preview h1,
.preview h2,
.preview h3 {
  line-height: 1.15;
}

.preview code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #fff0f7;
}

.preview pre {
  overflow-x: auto;
  padding: 14px;
  border-radius: 8px;
  background: #5a4665;
  color: #fff;
}

.preview blockquote {
  margin-left: 0;
  padding-left: 16px;
  border-left: 4px solid var(--gold);
  color: var(--muted);
}

.editor-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.no-results {
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .topbar,
  .top-actions {
    align-items: stretch;
    flex-direction: column;
    min-width: 0;
  }

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

  .blog-layout {
    grid-template-columns: 1fr;
  }

  .public-blog-layout {
    grid-template-columns: 1fr;
  }

  .public-blog-hero,
  .public-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .public-tag-filter {
    justify-content: flex-start;
  }

  .public-featured {
    grid-template-columns: 1fr;
  }

  .featured-card.large {
    min-height: 320px;
  }

  .note-list {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .workspace {
    padding: 18px;
  }

  .stats-grid,
  .meta-row,
  .editor-head,
  .writing-area.split {
    grid-template-columns: 1fr;
  }

  .editor-actions {
    justify-content: flex-start;
  }
}

/* Public review-ready presentation */
.public-blog-page {
  --review-ink: #17211d;
  --review-muted: #66736d;
  --review-paper: #f6f4ee;
  --review-panel: #ffffff;
  --review-line: #d9ddd4;
  --review-accent: #0f766e;
  --review-accent-2: #b85c38;
  --review-soft: #e9f3ef;
  --review-shadow: 0 22px 70px rgba(36, 45, 40, 0.12);
  color: var(--review-ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.08), transparent 36%),
    linear-gradient(180deg, #fbfaf6 0%, var(--review-paper) 100%);
}

.public-blog-page .eyebrow {
  color: var(--review-accent-2);
  font-family: inherit;
  letter-spacing: 0.16em;
}

.public-blog-page h1,
.public-blog-page h2,
.public-blog-page h3 {
  letter-spacing: 0;
  text-shadow: none;
}

.public-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0 24px;
}

.public-brand,
.public-nav a {
  color: var(--review-ink);
  text-decoration: none;
}

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

.public-brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #fff;
  background: var(--review-ink);
}

.public-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--review-muted);
  font-size: 14px;
}

.public-nav-links a:hover {
  color: var(--review-accent);
}

.public-blog-hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: clamp(22px, 5vw, 54px);
  padding: clamp(28px, 5vw, 62px);
  border-color: var(--review-line);
  background:
    radial-gradient(circle at 92% 8%, rgba(184, 92, 56, 0.16), transparent 28%),
    linear-gradient(135deg, #ffffff, #edf4f1);
  box-shadow: var(--review-shadow);
}

.public-blog-hero::after {
  content: none;
}

.public-blog-hero h1 {
  max-width: 780px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
}

.public-blog-hero p:last-child,
.public-blog-hero > div > p {
  max-width: 760px;
  color: var(--review-muted);
  font-size: 17px;
  line-height: 1.85;
}

.public-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.public-blog-page .primary-btn,
.public-blog-page .secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  padding: 11px 16px;
  text-decoration: none;
  box-shadow: none;
}

.public-blog-page .primary-btn {
  border-color: var(--review-accent);
  background: var(--review-accent);
}

.public-blog-page .secondary-btn {
  color: var(--review-ink);
  border-color: var(--review-line);
  background: #fff;
}

.public-product-panel {
  position: relative;
  z-index: 1;
}

.product-window {
  border: 1px solid rgba(23, 33, 29, 0.14);
  border-radius: 8px;
  overflow: hidden;
  background: #fbfbf8;
  box-shadow: 18px 18px 0 rgba(15, 118, 110, 0.12);
}

.product-window-bar {
  display: flex;
  gap: 7px;
  padding: 12px;
  border-bottom: 1px solid var(--review-line);
  background: #f1eee6;
}

.product-window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--review-accent-2);
}

.product-window-bar span:nth-child(2) {
  background: #d2a84f;
}

.product-window-bar span:nth-child(3) {
  background: var(--review-accent);
}

.product-window-body {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  min-height: 260px;
}

.product-sidebar {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px 14px;
  border-right: 1px solid var(--review-line);
  background: #f7f4ed;
  font-size: 13px;
}

.product-sidebar span,
.product-sidebar b {
  padding: 8px 9px;
  border-radius: 7px;
}

.product-sidebar b {
  color: #fff;
  background: var(--review-ink);
}

.product-document {
  padding: 24px;
}

.product-document small {
  color: var(--review-accent);
  font-weight: 700;
}

.product-document strong {
  display: block;
  margin-top: 14px;
  font-size: 28px;
  line-height: 1.2;
}

.product-document p {
  color: var(--review-muted);
  line-height: 1.7;
}

.product-lines {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.product-lines i {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: #dfe8e2;
}

.product-lines i:nth-child(2) {
  width: 78%;
}

.product-lines i:nth-child(3) {
  width: 58%;
  background: #eadbd1;
}

.public-hero-stats {
  grid-column: 1 / -1;
  min-width: 0;
}

.public-hero-stats article,
.public-info-grid article,
.public-filter-bar,
.public-post-list,
.public-post-reader,
.featured-card {
  border-color: var(--review-line);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--review-shadow);
}

.public-hero-stats span,
.public-post-card p,
.featured-card p,
.blog-reader-meta,
.public-footer {
  color: var(--review-muted);
}

.public-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.public-info-grid article {
  padding: 22px;
  border: 1px solid var(--review-line);
  border-radius: 8px;
}

.public-info-grid span {
  color: var(--review-accent-2);
  font-weight: 800;
}

.public-info-grid h2 {
  margin: 14px 0 8px;
  font-size: 22px;
}

.public-info-grid p {
  margin: 0;
  color: var(--review-muted);
  line-height: 1.7;
}

.featured-card,
.featured-card.large {
  color: var(--review-ink);
  background:
    radial-gradient(circle at 86% 12%, rgba(15, 118, 110, 0.13), transparent 28%),
    linear-gradient(135deg, #ffffff, #f4f1e9);
}

.featured-card:hover,
.public-post-card:hover,
.public-post-card.active {
  border-color: var(--review-accent);
  background: #f3faf7;
}

.featured-index {
  color: rgba(15, 118, 110, 0.14);
}

.featured-meta,
.public-post-card span,
.public-footer a {
  color: var(--review-accent);
}

.public-tag-filter button,
.badge {
  border-color: var(--review-line);
  color: var(--review-accent);
  background: #fff;
}

.public-tag-filter button.active,
.public-tag-filter button:hover {
  border-color: var(--review-accent);
  background: var(--review-accent);
}

.public-post-card {
  border-color: var(--review-line);
  background: #fff;
}

.public-reader-head {
  border-bottom-color: var(--review-line);
}

.public-reader-head h2 {
  font-size: clamp(34px, 5vw, 62px);
}

.blog-reader-content {
  color: #26302b;
}

.blog-reader-content p,
.blog-reader-content li {
  line-height: 1.9;
}

.public-empty {
  color: var(--review-muted);
}

@media (max-width: 1100px) {
  .public-blog-hero,
  .public-info-grid {
    grid-template-columns: 1fr;
  }

  .public-product-panel {
    order: 3;
  }
}

@media (max-width: 720px) {
  .public-blog-shell {
    width: min(100% - 28px, 1180px);
    padding-top: 16px;
  }

  .public-nav,
  .public-nav-links,
  .public-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .public-nav-links {
    gap: 10px;
  }

  .public-blog-hero {
    padding: 24px;
  }

  .product-window-body {
    grid-template-columns: 1fr;
  }

  .product-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--review-line);
  }

  .public-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
