@import url('markdown-prose.css');

.liusheng-subnav {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.liusheng-subnav-link {
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}
.liusheng-subnav-link:hover,
.liusheng-subnav-link.active {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-glow);
}
.liusheng-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.liusheng-filters .tag {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}
.liusheng-filters .tag-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.liusheng-back-bar { margin-bottom: 16px; }
.btn-secondary {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-secondary:hover {
  background: var(--bg2);
  color: var(--text);
  border-color: var(--accent);
}
.liusheng-policy {
  margin-bottom: 20px;
  line-height: 1.55;
  font-size: 13px;
}
.liusheng-article-list { display: flex; flex-direction: column; gap: 12px; }

/* ── Reading plaza feed cards ── */
.liusheng-feed-page {
  max-width: var(--site-max-width);
}

.liusheng-feed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 880px) {
  .liusheng-feed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

.liusheng-feed-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.liusheng-feed-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
  color: inherit;
}

.liusheng-feed-cover {
  position: relative;
  aspect-ratio: 16 / 6;
  overflow: hidden;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

.liusheng-feed-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.liusheng-feed-card:hover .liusheng-feed-cover img {
  transform: scale(1.03);
}

.liusheng-feed-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  padding: 16px 18px 18px;
}

.liusheng-feed-card:not(.has-cover) .liusheng-feed-body {
  padding-top: 18px;
}

.liusheng-feed-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.liusheng-feed-excerpt {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.liusheng-feed-meta {
  margin: auto 0 0;
  padding-top: 4px;
  font-size: 12px;
  color: var(--text-faint);
}

.liusheng-feed-card:not(.has-cover) {
  border-left: 3px solid var(--accent-dim);
}

.liusheng-card {
  display: block;
  padding: 16px 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}
.liusheng-card-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 0;
}
.liusheng-card-row:hover { border-color: var(--accent); }
.liusheng-card-main {
  flex: 1;
  min-width: 0;
  padding: 16px 18px;
  color: inherit;
}
.liusheng-card-main:hover { color: inherit; }
.liusheng-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 0 0;
  flex-shrink: 0;
  max-width: min(100%, 320px);
}
@media (max-width: 720px) {
  .liusheng-card-row {
    flex-direction: column;
    align-items: stretch;
  }
  .liusheng-card-actions {
    max-width: none;
    padding: 0 14px 14px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
  }
}
.liusheng-delete-form {
  display: flex;
  align-items: center;
  margin: 0;
}
.btn-danger {
  background: rgba(248, 81, 73, .15);
  border: 1px solid var(--red, #f85149);
  color: var(--red, #f85149);
}
.btn-danger:hover {
  background: rgba(248, 81, 73, .28);
  color: #fff;
}
.liusheng-card:hover { border-color: var(--accent); color: inherit; }
.liusheng-card-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.liusheng-card-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
}
.liusheng-card-headline .liusheng-card-title {
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 12rem;
}
.liusheng-card-inline-meta {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-faint);
  white-space: nowrap;
}
.liusheng-card-sep { opacity: 0.55; user-select: none; }
.liusheng-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--text-faint);
}
.liusheng-badge {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg3);
  color: var(--text-muted);
}
.liusheng-badge-copy { color: var(--yellow); border: 1px solid var(--yellow); background: transparent; }
.liusheng-badge-published { color: var(--green); border: 1px solid var(--green); background: transparent; }
.liusheng-badge-draft { color: var(--text-faint); border: 1px solid var(--border); background: transparent; }
.liusheng-inline-form { display: inline; margin: 0; }
.liusheng-publish-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.liusheng-publish-form--compact {
  gap: 8px 12px;
}
.liusheng-publish-panel {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.liusheng-publish-panel-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.liusheng-publish-panel .liusheng-publish-form { margin: 0; }
.liusheng-auto-cover-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.liusheng-auto-cover-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.liusheng-messages { margin-bottom: 16px; }
.liusheng-messages .alert { margin-bottom: 8px; }
.liusheng-messages .alert:last-child { margin-bottom: 0; }

/* ── Article read view (Cursor / VS Code markdown preview–like) ── */
.liusheng-article.page-container-md {
  max-width: var(--site-max-width);
}

.liusheng-article {
  --reader-size: 17px;
  --reader-leading: 1.78;
  --reader-measure: 56rem;
  --reader-pad-x: clamp(20px, 4vw, 40px);
  --reader-pad-y: clamp(24px, 3vw, 40px);
}

.liusheng-article-header {
  max-width: var(--reader-measure);
  margin: 0 auto 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.liusheng-article-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw + 1rem, 1.85rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 12px;
}

.liusheng-article-meta {
  margin: 0 0 14px;
}

.liusheng-reader {
  max-width: calc(var(--reader-measure) + var(--reader-pad-x) * 2);
  margin: 0 auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.liusheng-article .liusheng-body.prose {
  max-width: var(--reader-measure);
  margin: 0 auto;
  padding: var(--reader-pad-y) var(--reader-pad-x);
  font-size: var(--reader-size);
  line-height: var(--reader-leading);
  color: var(--text);
  font-weight: 400;
  letter-spacing: 0.01em;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.liusheng-article .liusheng-body.prose > *:first-child {
  margin-top: 0;
}

.liusheng-article .liusheng-body.prose > *:last-child {
  margin-bottom: 0;
}

.liusheng-article .liusheng-body h1.liusheng-h1,
.liusheng-article .liusheng-body h2.liusheng-h2,
.liusheng-article .liusheng-body h3.liusheng-h3 {
  font-family: var(--font-display);
  margin: 1.65em 0 0.55em;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.02em;
  color: var(--text);
}

.liusheng-article .liusheng-body h1.liusheng-h1 {
  font-size: 1.55em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid var(--border);
}

.liusheng-article .liusheng-body h2.liusheng-h2 {
  font-size: 1.32em;
}

.liusheng-article .liusheng-body h3.liusheng-h3 {
  font-size: 1.12em;
  color: #d8e1ea;
}

.liusheng-article .liusheng-body blockquote.liusheng-quote {
  margin: 1.25em 0;
  padding: 0.75em 1.15em;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
  background: rgba(47, 129, 247, 0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.liusheng-article .liusheng-body blockquote.liusheng-quote p {
  margin: 0;
}

.liusheng-article .liusheng-body ul.liusheng-list,
.liusheng-article .liusheng-body ol.liusheng-list {
  margin: 0 0 1.1em;
  padding-left: 1.65em;
}

.liusheng-article .liusheng-body .liusheng-figure {
  margin: 1.5em 0;
  padding: 0;
}

.liusheng-article .liusheng-body .liusheng-figure img {
  display: block;
  margin: 0 auto 10px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.4);
}

.liusheng-article .liusheng-body .liusheng-caption {
  margin: 0;
  font-size: 0.88em;
  line-height: 1.55;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 640px) {
  .liusheng-article {
    --reader-size: 16px;
    --reader-pad-x: 16px;
    --reader-pad-y: 20px;
  }

  .liusheng-article-header {
    margin-bottom: 16px;
    padding-bottom: 14px;
  }

  .liusheng-reader {
    border-radius: var(--radius);
  }
}
.liusheng-export-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.liusheng-help {
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-muted);
}
.liusheng-help ol { margin: 10px 0 0 1.2rem; }
.liusheng-help li { margin-bottom: 6px; }
.liusheng-form.card { padding: 20px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.liusheng-form .form-textarea { width: 100%; font-family: var(--font-mono); font-size: 12px; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); padding: 10px; }
.liusheng-format-options {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.liusheng-format-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.liusheng-format-option input { accent-color: var(--accent); }
.liusheng-body-hint { margin-top: 8px; }
.liusheng-form input[type="text"], .liusheng-form select { width: 100%; max-width: 400px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); }
.liusheng-status { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.pagination { display: flex; gap: 16px; align-items: center; justify-content: center; margin-top: 28px; font-size: 13px; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-faint); }
.alert-info { background: rgba(56,139,253,.1); border: 1px solid var(--accent); color: var(--text-muted); padding: 12px 14px; border-radius: var(--radius); margin-bottom: 16px; }
.alert-warning { background: rgba(210,153,34,.12); border: 1px solid var(--yellow); color: var(--yellow); padding: 12px 14px; border-radius: var(--radius); margin-bottom: 16px; }
.alert-success, .liusheng-cookie-saved { background: rgba(63,185,80,.1); border: 1px solid var(--green); color: var(--green); padding: 12px 14px; border-radius: var(--radius); margin-bottom: 16px; }
.liusheng-cookie-saved strong { color: var(--text); }
.liusheng-sync-logs { padding: 16px 18px; margin-top: 20px; margin-bottom: 0; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.liusheng-sync-logs-title { font-size: 15px; margin-bottom: 4px; }
.liusheng-log-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.liusheng-log-item {
  display: grid;
  grid-template-columns: 72px 72px 1fr;
  grid-template-rows: auto auto;
  gap: 6px 10px;
  font-size: 12px;
  align-items: start;
  padding: 8px 10px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.liusheng-log-time { color: var(--text-faint); font-family: var(--font-mono); grid-row: 1; }
.liusheng-log-status { font-weight: 600; grid-row: 1; }
.liusheng-log-ok .liusheng-log-status { color: var(--green); }
.liusheng-log-fail .liusheng-log-status { color: var(--red); }
.liusheng-log-cookie_invalid .liusheng-log-status { color: var(--yellow); }
.liusheng-log-msg {
  grid-column: 1 / -1;
  color: var(--text-muted);
  word-break: break-word;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  max-height: calc(1.45em * 2);
}
