:root {
  --bg: #f6f1e7;
  --bg-soft: #efe6d7;
  --panel: #fff8ee;
  --panel-strong: #fffdf8;
  --text: #1f2c32;
  --muted: #5a6971;
  --line: #d8cdbb;
  --accent: #0f766e;
  --accent-ink: #0b5b55;
  --accent-alt: #c16c2f;
  --danger: #b13f4d;
  --shadow-soft: 0 20px 40px rgba(30, 35, 38, 0.1);
  --shadow-card: 0 10px 22px rgba(20, 28, 33, 0.08);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  color: var(--text);
  font-family: "Plus Jakarta Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at 8% 12%, rgba(223, 170, 113, 0.24), transparent 34%),
    radial-gradient(circle at 92% 5%, rgba(91, 165, 142, 0.2), transparent 30%),
    linear-gradient(180deg, #f8f3ea 0%, #efe4d2 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  filter: blur(24px);
}

body::before {
  right: -120px;
  top: 130px;
  background: rgba(15, 118, 110, 0.12);
}

body::after {
  left: -120px;
  bottom: 90px;
  background: rgba(193, 108, 47, 0.12);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-ink);
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 25;
  border-bottom: 1px solid rgba(216, 205, 187, 0.75);
  background: rgba(252, 248, 241, 0.84);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-family: "Noto Serif SC", "STSong", serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(160deg, #1f8a80 0%, #0f766e 60%, #0b5b55 100%);
  box-shadow: 0 8px 16px rgba(15, 118, 110, 0.24);
}

.brand-copy {
  display: grid;
  line-height: 1.14;
}

.brand-copy strong {
  font-family: "Noto Serif SC", "STSong", serif;
  letter-spacing: 0.01em;
  font-size: 1.03rem;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-nav-btn {
  min-width: 92px;
}

.site-nav a {
  color: #2d4149;
  font-size: 0.92rem;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.site-nav a:hover {
  background: rgba(15, 118, 110, 0.09);
  color: var(--accent-ink);
}

.site-nav a.is-active {
  color: var(--accent-ink);
  background: rgba(15, 118, 110, 0.14);
  border-color: rgba(15, 118, 110, 0.3);
}

.main-content {
  padding: 34px 0 72px;
  display: grid;
  gap: 24px;
}

.breadcrumb-nav {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-strong);
  box-shadow: var(--shadow-card);
  padding: 10px 14px;
  animation: rise-up 0.45s ease both;
}

.breadcrumb-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: #8c999f;
  margin-right: 2px;
}

.breadcrumb-item a {
  color: var(--accent-ink);
}

.breadcrumb-item.is-current span {
  color: var(--text);
  font-weight: 700;
}

.hero,
.detail-header,
.article-reader,
.comments-wrap,
.admin-panel,
.not-found {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  animation: rise-up 0.55s ease both;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 4% 8%, rgba(255, 255, 255, 0.52), transparent 42%),
    linear-gradient(150deg, rgba(255, 250, 242, 0.95) 0%, rgba(241, 245, 240, 0.9) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.18) 0%, rgba(15, 118, 110, 0.02) 68%);
  pointer-events: none;
}

.kicker {
  margin: 0;
  color: var(--accent-ink);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 700;
}

.hero h1,
.detail-header h1,
.admin-panel h1,
.not-found h1 {
  margin: 10px 0 12px;
  font-family: "Noto Serif SC", "STSong", serif;
  font-size: clamp(1.65rem, 3.3vw, 2.28rem);
  line-height: 1.24;
}

.hero-lead {
  margin: 0;
  max-width: 760px;
  color: #3f525c;
}

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

.stat-chip {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  background: rgba(255, 255, 255, 0.55);
}

.stat-chip strong {
  font-size: 1.2rem;
  line-height: 1.2;
}

.stat-chip span {
  color: var(--muted);
  font-size: 0.84rem;
}

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

.section-head h2,
.article-list > h2 {
  margin: 0;
  font-family: "Noto Serif SC", "STSong", serif;
  font-size: 1.24rem;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.article-list {
  display: grid;
  gap: 14px;
  animation: rise-up 0.65s ease both;
}

.card-grid {
  display: grid;
  gap: 14px;
}

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

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

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

.column-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 252, 246, 0.96) 100%);
  box-shadow: var(--shadow-card);
  padding: 16px;
}

.column-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.column-card-head h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
}

.column-card-head h3 a {
  color: var(--text);
}

.column-latest-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
}

.column-latest-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px dashed #dfd3c2;
}

.column-latest-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.column-article-link {
  color: #2b3f48;
  font-weight: 600;
}

.column-article-link:hover {
  color: var(--accent-ink);
}

.column-latest-list time {
  color: var(--muted);
  font-size: 0.82rem;
  flex-shrink: 0;
}

.column-empty {
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 0 !important;
  padding-top: 2px !important;
}

.article-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 251, 243, 0.96) 100%);
  box-shadow: var(--shadow-card);
  padding: 18px;
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease;
}

.article-card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.95) 0%, rgba(193, 108, 47, 0.82) 100%);
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 16px 34px rgba(20, 28, 33, 0.12);
}

.article-card h2,
.article-card h3 {
  margin: 0 0 9px;
  line-height: 1.35;
  font-size: 1.07rem;
}

.article-card h2 a,
.article-card h3 a {
  color: var(--text);
}

.article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.article-card p a {
  color: inherit;
}

.meta {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--muted);
}

.meta a,
.text-link {
  color: var(--accent);
  font-weight: 700;
}

.detail-wrap {
  display: grid;
  gap: 18px;
}

.excerpt {
  margin: 10px 0 14px;
  color: var(--muted);
}

.meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: #22575a;
  font-size: 0.83rem;
  padding: 5px 11px;
}

.cover-image-wrap {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.cover-image-wrap img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.article-reader {
  position: relative;
  min-height: 260px;
  background: var(--panel-strong);
  line-height: 1.78;
  font-size: 1.02rem;
}

.article-reader .loading {
  color: var(--muted);
}

.article-reader p {
  margin-top: 0;
  margin-bottom: 16px;
}

.watermark {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(60, 69, 74, 0.28);
  pointer-events: none;
}

.protect-content {
  user-select: none;
}

.comments-wrap h2,
.admin-panel h2 {
  margin-top: 0;
}

.comment-form,
.form-grid {
  display: grid;
  gap: 12px;
}

.helper-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

label {
  display: grid;
  gap: 8px;
}

label span,
.field-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.field-label {
  display: block;
  margin-bottom: 6px;
}

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

input,
textarea,
select {
  border: 1px solid #d6c7b2;
  border-radius: var(--radius-sm);
  background: #fffef9;
  padding: 11px 13px;
  color: var(--text);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.62);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
  background: #ffffff;
}

.tag-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 9px;
}

.tag-option {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 10px;
  background: #fffdf7;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.tag-option:hover {
  border-color: rgba(15, 118, 110, 0.35);
  background: #fffaf0;
}

.tag-option input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.tag-option span {
  color: var(--text);
  font-size: 0.9rem;
}

.tag-option input:checked + span {
  color: var(--accent-ink);
  font-weight: 700;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  background: linear-gradient(140deg, #15887e 0%, #0f766e 60%, #0a5d56 100%);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.24);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.btn-muted {
  background: linear-gradient(145deg, #f0dfc8 0%, #ead5b9 100%);
  color: #554636;
}

.btn-danger {
  background: linear-gradient(145deg, #cf5665 0%, #b13f4d 100%);
}

.danger-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-weight: 700;
}

.danger-link:hover {
  color: #973445;
}

.flash-wrap {
  display: grid;
  gap: 10px;
  margin-bottom: 2px;
}

.flash {
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
}

.flash-success {
  background: #dff4e7;
}

.flash-error {
  background: #fde7ea;
}

.comment-list {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.comment-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fffdf7;
}

.comment-meta-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.comment-item h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.comment-item p {
  margin: 0 0 8px;
  white-space: pre-wrap;
}

.comment-item time {
  color: var(--muted);
  font-size: 0.85rem;
}

.comment-item .reply-trigger {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.comment-item .reply-trigger:hover {
  color: var(--accent-ink);
}

.comment-children {
  margin-top: 10px;
  margin-left: 6px;
  padding-left: 10px;
  border-left: 2px solid #e8dac4;
  display: grid;
  gap: 10px;
}

.comment-depth-1 {
  background: #fff8ec;
}

.comment-depth-2,
.comment-depth-3,
.comment-depth-4 {
  background: #fff4e6;
}

.admin-panel {
  display: grid;
  gap: 16px;
}

.narrow {
  max-width: 560px;
  margin: 0 auto;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-topbar h1 {
  margin: 0;
}

.admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-actions form {
  margin: 0;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fffdf8;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f2e7d5;
  color: #2f454f;
}

tbody tr:hover td {
  background: #fcf6ed;
}

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.85rem;
}

.status-published {
  background: #d9f3e7;
  color: #075a52;
}

.status-draft {
  background: #f8e7ce;
  color: #8f4f1e;
}

.action-cell {
  min-width: 220px;
}

.action-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.action-inline form {
  margin: 0;
}

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

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

.empty-state {
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fffdf8;
  padding: 14px;
}

.field-readonly input {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.03em;
}

.helper-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
  padding: 12px;
}

.helper-block summary {
  cursor: pointer;
  font-weight: 700;
}

.helper-block p {
  margin: 8px 0;
  color: var(--muted);
}

.mono-wrap {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f5efe3;
  border-radius: 10px;
  padding: 8px;
}

.not-found {
  text-align: center;
}

.not-found p {
  margin: 0;
  color: var(--muted);
}

.not-found .btn {
  margin-top: 10px;
}

.site-footer {
  border-top: 1px solid rgba(216, 205, 187, 0.8);
  background: rgba(250, 244, 235, 0.75);
  backdrop-filter: blur(8px);
}

.footer-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

@keyframes rise-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

@media (max-width: 1100px) {
  .container {
    width: min(100%, calc(100% - 28px));
  }

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

@media (max-width: 860px) {
  .header-inner {
    min-height: 68px;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 10px 0;
  }

  .main-content {
    padding: 26px 0 58px;
  }

  .hero,
  .detail-header,
  .article-reader,
  .comments-wrap,
  .admin-panel,
  .not-found {
    padding: 20px;
  }

  .hero-stats,
  .card-grid-2,
  .card-grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .meta {
    align-items: flex-start;
  }

  .admin-actions {
    width: 100%;
  }

  .admin-actions form {
    width: 100%;
  }

  .admin-actions .btn,
  .admin-actions .btn-danger,
  .admin-actions .btn-muted {
    width: 100%;
  }
}

@media (max-width: 560px) {
  body {
    line-height: 1.55;
  }

  .container {
    width: min(100%, calc(100% - 20px));
  }

  .site-nav {
    width: 100%;
  }

  .site-nav a {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
  }

  .brand-copy strong {
    font-size: 0.98rem;
  }

  .brand-copy small {
    font-size: 0.72rem;
  }

  .hero h1,
  .detail-header h1,
  .admin-panel h1 {
    font-size: 1.48rem;
  }

  .article-card,
  .detail-header,
  .article-reader,
  .comments-wrap,
  .admin-panel,
  .not-found,
  .hero {
    border-radius: 14px;
  }
}
