:root {
  --ink: #18201d;
  --muted: #6d746e;
  --paper: #f7f3e8;
  --panel: #fffaf0;
  --line: #ded3bd;
  --leaf: #2d6a4f;
  --leaf-dark: #174835;
  --clay: #bd6a4a;
  --gold: #c49a38;
  --shadow: 0 20px 60px rgba(46, 40, 29, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Serif SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 14% 18%, rgba(196, 154, 56, 0.2), transparent 26%),
    linear-gradient(135deg, rgba(45, 106, 79, 0.12), transparent 36%),
    repeating-linear-gradient(90deg, rgba(24, 32, 29, 0.035) 0 1px, transparent 1px 28px),
    var(--paper);
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

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

.login-card {
  display: grid;
  width: min(420px, 100%);
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.94);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 0;
  font-family: "ZCOOL XiaoWei", serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 28px;
  background: rgba(255, 250, 240, 0.82);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: var(--panel);
  font-family: "ZCOOL XiaoWei", serif;
  font-size: 32px;
  background: var(--leaf);
  border-radius: 8px;
  box-shadow: 8px 8px 0 rgba(196, 154, 56, 0.28);
}

.brand p,
.brand h1,
.feed-header h2,
.editor-header h2,
.eyebrow {
  margin: 0;
}

.brand p,
.eyebrow,
.tag-panel p,
.search-box label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.brand h1,
.feed-header h2,
.editor-header h2 {
  font-family: "ZCOOL XiaoWei", serif;
  font-size: 34px;
  font-weight: 400;
}

.admin-profile-card {
  overflow: hidden;
  margin-bottom: 20px;
  padding: 0 14px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.88);
  text-align: center;
  box-shadow: 0 8px 24px rgba(46, 40, 29, 0.1);
}

.admin-profile-cover {
  height: 62px;
  margin: 0 -14px;
  background:
    linear-gradient(rgba(24, 32, 29, 0.16), rgba(24, 32, 29, 0.34)),
    var(--site-bg-image, url("/img/12.jpg")) center / cover;
}

.admin-profile-card img {
  width: 72px;
  height: 72px;
  margin-top: -36px;
  border: 3px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  object-fit: cover;
  background: white;
  box-shadow: 0 4px 14px rgba(24, 32, 29, 0.18);
  cursor: pointer;
}

.admin-profile-card h1 {
  margin: 7px 0 5px;
  color: var(--ink);
  font-size: 19px;
}

.admin-profile-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.admin-profile-card img.avatar-spin {
  animation: avatarSpinOnce 650ms ease-in-out;
}

.sidebar-actions,
.form-buttons {
  display: flex;
  gap: 10px;
}

.sidebar .sidebar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.sidebar .sidebar-actions .new-post-button {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 48px;
}

.sidebar .sidebar-actions .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 10px;
  color: var(--leaf-dark);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
  text-align: center;
  white-space: nowrap;
}

.sidebar .sidebar-actions #logoutButton {
  color: #b8654b;
  background: rgba(189, 106, 74, 0.1);
}

.admin-nav {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.admin-nav button {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.42);
}

.admin-nav button:hover,
.admin-nav button.active {
  border-color: rgba(45, 106, 79, 0.22);
  color: var(--leaf-dark);
  background: rgba(45, 106, 79, 0.12);
}

.new-post-button,
.save-button,
.ghost-button,
.tag-button,
.detail-link {
  border: 0;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.new-post-button,
.save-button {
  padding: 13px 18px;
  color: white;
  background: var(--leaf);
  box-shadow: 0 12px 24px rgba(23, 72, 53, 0.22);
}

.new-post-button {
  flex: 1;
}

.new-post-button:hover,
.save-button:hover,
.post-card:hover {
  transform: translateY(-2px);
}

.search-box,
.tag-panel {
  margin-top: 24px;
}

.search-box label,
.post-form label,
.login-card label {
  display: grid;
  gap: 8px;
}

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  outline: none;
}

input[type="file"] {
  padding: 9px;
}

textarea {
  resize: vertical;
  line-height: 1.7;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.14);
}

.password-card {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
}

.password-card p,
.password-card span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.account-password-card {
  margin: 0 0 16px;
}

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

.tag-button {
  padding: 8px 12px;
  color: var(--leaf-dark);
  background: rgba(45, 106, 79, 0.1);
}

.tag-button.active {
  color: white;
  background: var(--leaf-dark);
}

.main-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
}

.feed,
.editor-panel,
.dashboard-panel {
  min-width: 0;
}

.feed-header,
.editor-header,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-panel {
  grid-column: 1 / -1;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.92);
  box-shadow: var(--shadow);
}

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

.stat-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.stat-card span,
.muted-line,
#backupStatus {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  font-size: 28px;
}

.dashboard-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

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

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

.settings-form label {
  display: grid;
  gap: 8px;
}

.settings-form label:nth-child(3),
.settings-form label:nth-child(6),
.settings-form label:nth-child(7),
.settings-form label:nth-child(8),
.settings-form .save-button,
.settings-form p {
  grid-column: 1 / -1;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.admin-row p,
.admin-row span {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.reply-field {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.activity-row {
  align-items: flex-start;
}

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

.row-actions button,
.media-card button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--leaf-dark);
  background: rgba(255, 255, 255, 0.82);
}

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

.media-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.media-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.media-actions {
  display: grid;
  gap: 6px;
}

.option-row label,
.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-row input,
.inline-check input {
  width: auto;
}

.site-notice {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.dashboard-lists h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.dashboard-lists a,
.dashboard-lists p {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
  text-decoration: none;
}

.dashboard-lists span {
  color: var(--clay);
  font-size: 12px;
}

.chart-list,
.popular-list,
.side-list {
  display: grid;
  gap: 10px;
}

.chart-title {
  margin: 12px 0 2px;
  color: var(--leaf-dark);
  font-weight: 700;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(70px, 0.8fr) minmax(120px, 2fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.chart-row div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(45, 106, 79, 0.1);
}

.chart-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--leaf), var(--gold));
}

.popular-list a,
.side-list a {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.55);
}

.popular-list a {
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.popular-list span,
.side-list span {
  color: var(--muted);
  font-size: 12px;
}

#postCount,
#statusText,
#loginStatus {
  min-height: 20px;
  color: var(--muted);
  font-size: 14px;
}

.admin-welcome-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 80;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: min(360px, calc(100vw - 32px));
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  color: #24312e;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 46px rgba(27, 45, 37, 0.18);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.admin-welcome-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.welcome-toast-dot {
  position: relative;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 0 5px rgba(45, 106, 79, 0.12), 0 0 16px rgba(45, 106, 79, 0.28);
}

.welcome-toast-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(45, 106, 79, 0.24);
  border-radius: inherit;
  animation: adminWelcomePulse 2s ease-out infinite;
}

.admin-welcome-toast strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.admin-welcome-toast p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 13px;
}

@keyframes adminWelcomePulse {
  0% {
    opacity: 0.72;
    transform: scale(0.82);
  }
  80%, 100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

.settings-heading {
  align-items: center;
}

.settings-heading h2 {
  margin-bottom: 4px;
}

.settings-heading span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.settings-form {
  display: grid;
  gap: 16px;
}

.settings-card {
  display: grid;
  gap: 15px;
  padding: 18px;
  border: 1px solid rgba(42, 67, 57, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(27, 45, 37, 0.055);
}

.settings-card-primary {
  background:
    linear-gradient(135deg, rgba(45, 106, 79, 0.08), rgba(255, 255, 255, 0.9) 46%),
    rgba(255, 255, 255, 0.82);
}

.settings-card-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.settings-card-heading > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: var(--leaf-dark);
  background: rgba(45, 106, 79, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.settings-card-heading h3 {
  margin: 0;
  color: #263b34;
  font-size: 18px;
}

.settings-card-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

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

.settings-form label {
  display: grid;
  gap: 7px;
  color: #30483f;
  font-size: 14px;
}

.settings-form label small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.site-image-uploader {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(42, 67, 57, 0.14);
  border-radius: 8px;
  background: rgba(239, 246, 243, 0.72);
}

.site-avatar-uploader {
  grid-template-columns: 82px minmax(0, 1fr);
}

.site-background-uploader {
  grid-template-columns: 122px minmax(0, 1fr);
}

.site-avatar-preview {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  box-shadow: 0 7px 16px rgba(29, 53, 45, 0.18);
}

.site-background-preview {
  width: 122px;
  height: 82px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  box-shadow: 0 7px 16px rgba(29, 53, 45, 0.16);
}

.site-image-upload-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.site-image-upload-copy strong {
  color: #30483f;
  font-size: 15px;
}

.site-image-upload-copy p,
#siteAvatarUploadStatus,
#siteBackgroundUploadStatus {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.site-image-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.settings-savebar {
  position: sticky;
  bottom: 16px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(42, 67, 57, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 32px rgba(27, 45, 37, 0.11);
  backdrop-filter: blur(10px);
}

.settings-savebar #settingsStatus {
  margin: 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.post-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease;
}

.post-card.active {
  border-color: var(--leaf);
}

.post-cover {
  height: 150px;
  background:
    linear-gradient(135deg, rgba(45, 106, 79, 0.35), rgba(189, 106, 74, 0.28)),
    url("https://images.unsplash.com/photo-1455390582262-044cdead277a?auto=format&fit=crop&w=1000&q=80") center / cover;
}

.post-body {
  padding: 18px;
}

.post-meta {
  color: var(--muted);
  font-size: 12px;
}

.post-card h3 {
  margin: 9px 0 8px;
  font-size: 22px;
  line-height: 1.25;
}

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

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.post-tags span {
  padding: 4px 8px;
  color: var(--clay);
  border: 1px solid rgba(189, 106, 74, 0.25);
  border-radius: 999px;
  font-size: 12px;
}

.editor-panel {
  align-self: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.92);
  box-shadow: var(--shadow);
}

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

.ghost-button,
.detail-link {
  width: auto;
  padding: 9px 13px;
  color: var(--clay);
  background: rgba(189, 106, 74, 0.1);
}

.detail-link {
  display: inline-flex;
  align-items: center;
}

.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

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

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

.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px auto;
  gap: 8px;
}

.rich-editor-block {
  display: grid;
  gap: 8px;
}

.rich-editor-block > span {
  color: var(--ink);
}

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

.editor-toolbar button,
.pagination button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 11px;
  color: var(--leaf-dark);
  background: rgba(255, 255, 255, 0.78);
}

.rich-editor {
  min-height: 260px;
  max-height: 520px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
  outline: none;
}

.rich-editor:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.14);
}

.rich-editor.is-dragging {
  border-color: var(--leaf);
  background: rgba(45, 106, 79, 0.1);
  box-shadow: inset 0 0 0 2px rgba(45, 106, 79, 0.24);
}

.rich-editor img,
.article-content img {
  max-width: 100%;
  border-radius: 8px;
}

.article-image {
  display: block;
  max-width: 100%;
  margin: 18px auto;
}

.article-image.size-small {
  width: 40%;
}

.article-image.size-medium {
  width: 60%;
}

.article-image.size-large {
  width: 80%;
}

.article-image.size-full {
  width: 100%;
}

.article-image.align-left {
  margin-right: auto;
  margin-left: 0;
}

.article-image.align-center {
  margin-right: auto;
  margin-left: auto;
}

.article-image.align-right {
  margin-right: 0;
  margin-left: auto;
}

.article-image img {
  display: block;
  width: 100%;
  height: auto;
}

.article-image figcaption {
  padding: 7px 4px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.rich-editor .article-image {
  padding: 5px;
  border: 1px dashed transparent;
  border-radius: 8px;
}

.rich-editor .article-image:has(img.is-selected) {
  border-color: var(--leaf);
  background: rgba(45, 106, 79, 0.07);
}

.rich-editor img.is-selected {
  outline: 3px solid rgba(45, 106, 79, 0.26);
  outline-offset: 2px;
}

.editor-upload-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
}

.editor-upload-progress progress {
  width: 100%;
  accent-color: var(--leaf);
}

.image-editor-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(45, 106, 79, 0.28);
  border-radius: 8px;
  background: rgba(45, 106, 79, 0.06);
}

.image-editor-heading {
  align-self: center;
  grid-column: 1 / -1;
}

.image-editor-heading strong,
.image-editor-heading span {
  display: block;
}

.image-editor-heading span,
.editor-image-hint {
  color: var(--muted);
  font-size: 12px;
}

.image-align-buttons {
  display: flex;
  gap: 5px;
}

.image-align-buttons button {
  flex: 1;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--leaf-dark);
  background: rgba(255, 255, 255, 0.78);
}

.image-align-buttons button.is-active {
  border-color: var(--leaf);
  color: white;
  background: var(--leaf);
}

.editor-image-hint {
  margin: 0;
}

.danger-button {
  justify-self: start;
  border: 1px solid rgba(180, 67, 50, 0.28);
  border-radius: 8px;
  padding: 10px 14px;
  color: #a3392b;
  background: rgba(180, 67, 50, 0.08);
}

.image-library-dialog {
  overflow: auto;
}

.image-library-grid {
  padding-top: 8px;
}

.rich-editor blockquote,
.article-content blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 4px solid var(--gold);
  background: rgba(196, 154, 56, 0.12);
}

.form-actions {
  margin: 2px 0 0;
}

.save-button {
  min-width: 138px;
}

.empty-state {
  padding: 36px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 32, 29, 0.5);
  backdrop-filter: blur(8px);
}

.preview-dialog {
  width: min(980px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.preview-article {
  box-shadow: none;
}

.live-preview-panel {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
}

.live-preview-panel .feed-header {
  margin: 0;
  padding-bottom: 8px;
}

.live-preview-article {
  max-height: 520px;
  overflow: auto;
  box-shadow: none;
}

.live-preview-article .article-cover {
  min-height: 180px;
}

.live-preview-article h1 {
  font-size: clamp(28px, 4vw, 42px);
}

.live-preview-article .article-content {
  padding-bottom: 24px;
}

.site-hero {
  min-height: 430px;
  padding: 24px clamp(18px, 5vw, 72px) 72px;
  color: white;
  background:
    linear-gradient(90deg, rgba(24, 32, 29, 0.78), rgba(24, 32, 29, 0.24)),
    url("https://images.unsplash.com/photo-1455390582262-044cdead277a?auto=format&fit=crop&w=1800&q=80") center / cover;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.site-logo {
  font-family: "ZCOOL XiaoWei", serif;
  font-size: 30px;
  text-decoration: none;
}

.admin-entry {
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 8px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
}

.site-hero-content {
  width: min(760px, 100%);
  margin-top: 92px;
}

.site-hero-content h1 {
  margin: 10px 0 18px;
  font-family: "ZCOOL XiaoWei", serif;
  font-size: clamp(42px, 8vw, 78px);
  font-weight: 400;
  line-height: 1.08;
}

.site-hero-content p:last-child {
  max-width: 620px;
  margin: 0;
  font-size: 18px;
  line-height: 1.8;
}

.site-main {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  width: min(1180px, calc(100% - 36px));
  margin: -44px auto 60px;
  align-items: start;
}

.site-filter,
.site-feed {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.94);
  box-shadow: var(--shadow);
}

.site-filter {
  position: sticky;
  top: 22px;
  padding: 22px;
}

.site-feed {
  padding: 24px;
}

.front-post-list {
  display: grid;
  gap: 18px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.pagination span {
  color: var(--muted);
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.front-post-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.front-cover {
  min-height: 210px;
  background-position: center;
  background-size: cover;
}

.front-post-content {
  padding: 22px;
}

.front-post-content h3 {
  margin: 8px 0 10px;
  font-size: 28px;
  line-height: 1.25;
}

.front-post-content h3 a {
  text-decoration: none;
}

.front-post-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.detail-page {
  width: min(920px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.detail-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--leaf-dark);
  text-decoration: none;
}

.article-view {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.94);
  box-shadow: var(--shadow);
}

.article-cover {
  min-height: 320px;
  background-position: center;
  background-size: cover;
}

.article-view > :not(.article-cover) {
  margin-left: clamp(20px, 6vw, 64px);
  margin-right: clamp(20px, 6vw, 64px);
}

.article-meta {
  margin-top: 34px;
  color: var(--muted);
}

.article-view h1 {
  margin-top: 8px;
  margin-bottom: 16px;
  font-family: "ZCOOL XiaoWei", serif;
  font-size: 48px;
  font-weight: 400;
  line-height: 1.18;
}

.article-summary {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.article-tags {
  margin-bottom: 28px;
}

.article-content {
  padding-bottom: 44px;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 18px;
  line-height: 2;
}

.article-content h2 {
  margin-top: 28px;
  margin-bottom: 14px;
  font-size: 30px;
}

.comments-panel {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.94);
  box-shadow: var(--shadow);
}

.comment-form {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.comment-form .save-button {
  width: fit-content;
}

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

.comment-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.comment-card span,
#commentStatus {
  margin-left: 8px;
  color: var(--muted);
  font-size: 13px;
}

.comment-card p {
  margin: 8px 0 0;
  line-height: 1.7;
}

@media (max-width: 1080px) {
  .app-shell,
  .main-area,
  .site-main,
  .settings-form,
  .dashboard-lists {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .sidebar,
  .editor-panel,
  .site-filter {
    position: static;
    height: auto;
  }
}

@media (max-width: 720px) {
  .sidebar,
  .main-area,
  .editor-panel {
    padding: 18px;
  }

  .feed-header,
  .editor-header,
  .form-actions,
  .two-column,
  .upload-row,
  .image-editor-panel {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .sidebar-actions,
  .form-buttons {
    flex-direction: column;
  }

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

  .admin-nav button {
    text-align: center;
  }

  .password-card {
    grid-template-columns: 1fr;
  }

  .media-actions,
  .row-actions,
  .editor-actions {
    justify-content: stretch;
  }

  .media-actions button,
  .row-actions button,
  .editor-actions .ghost-button {
    flex: 1;
  }

  .save-button {
    width: 100%;
  }

  .article-cover {
    min-height: 220px;
  }

  .article-view h1 {
    font-size: 36px;
  }

  .site-hero {
    min-height: 360px;
    padding-bottom: 54px;
  }

  .site-hero-content {
    margin-top: 58px;
  }

  .site-main {
    margin-top: -28px;
  }

  .front-post-card {
    grid-template-columns: 1fr;
  }

  .front-cover {
    min-height: 190px;
  }

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

/* Polished interaction layer */
:root {
  --paper: #f3f7f2;
  --panel: #ffffff;
  --line: #d9e2d7;
  --shadow: 0 22px 52px rgba(27, 45, 37, 0.12);
}

body {
  background:
    linear-gradient(135deg, rgba(45, 106, 79, 0.12), rgba(189, 106, 74, 0.08) 42%, rgba(255, 255, 255, 0) 72%),
    repeating-linear-gradient(90deg, rgba(24, 32, 29, 0.035) 0 1px, transparent 1px 32px),
    var(--paper);
}

.login-card,
.sidebar,
.editor-panel,
.site-filter,
.front-post-card,
.article-view,
.comments-panel,
.dashboard-panel,
.settings-panel,
.comments-admin-panel,
.media-panel,
.users-panel {
  backdrop-filter: blur(10px);
}

.front-post-card,
.post-card,
.media-card,
.comment-card,
.stat-card {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.front-post-card:hover,
.media-card:hover,
.comment-card:hover,
.stat-card:hover {
  border-color: rgba(45, 106, 79, 0.34);
  box-shadow: 0 18px 38px rgba(27, 45, 37, 0.12);
  transform: translateY(-2px);
}

.front-cover,
.article-cover {
  box-shadow: inset 0 -80px 120px rgba(24, 32, 29, 0.2);
}

.editor-toolbar {
  position: sticky;
  top: 10px;
  z-index: 5;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(27, 45, 37, 0.08);
}

.editor-toolbar button:hover,
.pagination button:hover:not(:disabled),
.ghost-button:hover,
.tag-button:hover {
  border-color: rgba(45, 106, 79, 0.36);
  background: rgba(45, 106, 79, 0.08);
  transform: translateY(-1px);
}

.rich-editor {
  min-height: 340px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
    repeating-linear-gradient(0deg, transparent 0 35px, rgba(45, 106, 79, 0.06) 35px 36px);
}

.rich-editor:empty::before {
  content: "开始写正文，支持标题、列表、引用、链接和插图";
  color: var(--muted);
}

.rich-editor h2,
.rich-editor h3,
.article-content h2,
.article-content h3 {
  line-height: 1.35;
}

.rich-editor a,
.article-content a {
  color: var(--leaf-dark);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.rich-editor ul,
.rich-editor ol,
.article-content ul,
.article-content ol {
  padding-left: 1.4em;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.comment-card > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.comment-card span {
  margin-left: 0;
}

#commentStatus,
#statusText,
#backupStatus,
#settingsStatus,
#passwordStatus,
#userStatus,
#loginStatus {
  min-height: 1.4em;
}

@media (max-width: 720px) {
  .settings-grid.two {
    grid-template-columns: 1fr;
  }

  .settings-savebar {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .editor-toolbar {
    position: static;
  }
}

/* Themes and front-page templates */
body[data-theme="ink"] {
  --ink: #f2f4f1;
  --muted: #aab4ad;
  --paper: #111715;
  --panel: #18201d;
  --line: #334139;
  --leaf: #d5b86a;
  --leaf-dark: #f0d98f;
  --clay: #8db3a5;
  --gold: #d5b86a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  background:
    linear-gradient(135deg, rgba(213, 184, 106, 0.16), rgba(141, 179, 165, 0.08) 42%, transparent 70%),
    #111715;
}

body[data-theme="sunset"] {
  --ink: #281c16;
  --muted: #7f675d;
  --paper: #fff4e8;
  --panel: #fffaf4;
  --line: #ead0c0;
  --leaf: #9c4f42;
  --leaf-dark: #6b332b;
  --clay: #c6794e;
  --gold: #cc8b3f;
  --shadow: 0 22px 52px rgba(105, 65, 43, 0.15);
  background:
    linear-gradient(135deg, rgba(198, 121, 78, 0.18), rgba(204, 139, 63, 0.14) 42%, transparent 72%),
    repeating-linear-gradient(90deg, rgba(40, 28, 22, 0.035) 0 1px, transparent 1px 32px),
    var(--paper);
}

body[data-theme="ink"] .site-hero,
body[data-theme="ink"] .sidebar,
body[data-theme="ink"] .login-card,
body[data-theme="ink"] .dashboard-panel,
body[data-theme="ink"] .editor-panel,
body[data-theme="ink"] .site-filter,
body[data-theme="ink"] .front-post-card,
body[data-theme="ink"] .article-view,
body[data-theme="ink"] .comments-panel {
  background-color: rgba(24, 32, 29, 0.88);
}

body[data-theme="ink"] input,
body[data-theme="ink"] textarea,
body[data-theme="ink"] select,
body[data-theme="ink"] .rich-editor,
body[data-theme="ink"] .editor-toolbar button,
body[data-theme="ink"] .pagination button {
  color: var(--ink);
  background: rgba(17, 23, 21, 0.84);
}

body[data-template="compact"] .site-hero {
  min-height: 300px;
}

body[data-template="compact"] .site-main {
  grid-template-columns: 240px minmax(0, 1fr);
}

body[data-template="compact"] .front-post-list {
  gap: 12px;
}

body[data-template="compact"] .front-post-card {
  grid-template-columns: 120px minmax(0, 1fr);
}

body[data-template="compact"] .front-cover {
  min-height: 120px;
}

body[data-template="compact"] .front-post-content {
  padding: 16px;
}

body[data-template="compact"] .front-post-content h3 {
  font-size: 22px;
}

body[data-template="compact"] .front-post-content p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-template="magazine"] .site-main {
  grid-template-columns: 1fr;
}

body[data-template="magazine"] .site-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
}

body[data-template="magazine"] .search-box,
body[data-template="magazine"] .tag-panel {
  margin-top: 0;
}

body[data-template="magazine"] .front-post-list {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

body[data-template="magazine"] .front-post-card {
  grid-template-columns: 1fr;
}

body[data-template="magazine"] .front-post-card:first-child {
  grid-column: 1 / -1;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
}

body[data-template="magazine"] .front-post-card:first-child .front-cover {
  min-height: 360px;
}

body[data-template="magazine"] .front-post-card:first-child h3 {
  font-size: 40px;
}

.transfer-panel {
  display: grid;
  grid-template-columns: auto minmax(170px, 220px) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.backup-restore {
  margin-top: 22px;
}

.backup-settings-form,
.media-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.54);
}

.backup-settings-form label {
  display: grid;
  gap: 4px;
  min-width: 116px;
  color: var(--muted);
  font-size: 12px;
}

.backup-settings-form input,
.backup-settings-form select {
  min-height: 36px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 10px;
  color: var(--leaf-dark);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.media-card {
  position: relative;
}

.media-select {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

/* Tutorials and gallery */
.content-index-page {
  min-height: 100vh;
  background: var(--site-bg-image) center / cover fixed;
}

.content-index-hero {
  min-height: 250px;
  color: #fff;
  background: linear-gradient(rgba(23, 42, 51, 0.45), rgba(23, 42, 51, 0.68)), var(--site-bg-image) center / cover;
  text-align: center;
}

.content-index-nav {
  display: flex;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  background: rgba(35, 40, 45, 0.9);
}

.content-index-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 2px solid transparent;
  font-weight: 600;
  text-decoration: none;
}

.content-index-nav a:hover,
.content-index-nav a.active {
  color: #fff;
  border-bottom-color: #72c7f4;
  background: rgba(255, 255, 255, 0.08);
}

.content-index-hero > div {
  padding: 46px 20px 40px;
}

.content-index-hero p,
.content-index-hero h1 {
  margin: 0;
}

.content-index-hero h1 {
  margin: 4px 0;
  font-family: "Noto Serif SC", serif;
  font-size: 44px;
}

.content-index-main {
  width: min(1080px, calc(100% - 28px));
  margin: 24px auto 0;
  padding: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.content-index-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.content-index-heading h2 {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #49aef0;
}

.tutorial-list {
  display: grid;
  gap: 16px;
}

.tutorial-card {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
}

.tutorial-cover {
  min-height: 180px;
  background-position: center;
  background-size: cover;
}

.tutorial-card > div {
  padding: 16px 16px 16px 0;
}

.tutorial-card span,
.tutorial-card p {
  color: #777;
}

.tutorial-card h2 {
  margin: 6px 0;
}

.tutorial-card h2 a,
.tutorial-read {
  color: #333;
  text-decoration: none;
}

.tutorial-read {
  color: #278bc7;
}

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

.gallery-card,
.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 5px;
  background: #eef3f3;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.gallery-card:hover img {
  transform: scale(1.05);
}

.gallery-card span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 26px 10px 9px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
}

@media (max-width: 700px) {
  .content-index-nav {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .content-index-nav a {
    min-width: max-content;
    padding: 0 13px;
  }

  .tutorial-card {
    grid-template-columns: 1fr;
  }

  .tutorial-cover {
    min-height: 190px;
  }

  .tutorial-card > div {
    padding: 0 14px 16px;
  }

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

/* Dashboard workbench */
.admin-dashboard > .dashboard-grid {
  grid-template-columns: repeat(6, minmax(110px, 1fr));
}

.admin-dashboard .stat-card {
  min-height: 116px;
}

.stat-card-violet {
  --stat-color: #78609d;
  --stat-soft: rgba(120, 96, 157, 0.13);
}

.dashboard-workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(245px, 0.72fr) minmax(260px, 0.82fr);
  gap: 14px;
  padding: 18px 22px 22px;
}

.dashboard-workbench-grid .dashboard-section {
  min-height: 0;
  padding: 14px;
}

.dashboard-trend-section {
  grid-column: span 2;
}

.dashboard-trend-chart {
  min-height: 214px;
}

.dashboard-trend-chart svg {
  display: block;
  width: 100%;
  height: 214px;
  overflow: visible;
}

.trend-grid-line {
  stroke: rgba(82, 112, 101, 0.14);
  stroke-dasharray: 4 5;
}

.trend-area {
  fill: url("#dashboardTrendFill");
}

.trend-line {
  fill: none;
  stroke: #4e947a;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.trend-dot {
  fill: #fff;
  stroke: #4e947a;
  stroke-width: 3;
}

.trend-label {
  fill: #899792;
  font-size: 11px;
}

.dashboard-section-heading button {
  padding: 0;
  color: var(--leaf);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.dashboard-gallery-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-gallery-preview article {
  min-width: 0;
}

.dashboard-gallery-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 0.82;
  border-radius: 6px;
  object-fit: cover;
}

.dashboard-gallery-preview strong,
.dashboard-gallery-preview small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-gallery-preview strong {
  color: #405049;
  font-size: 12px;
}

.dashboard-gallery-preview small {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-todo-list {
  display: grid;
  gap: 8px;
}

.dashboard-todo-list button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
  color: #405049;
  border: 1px solid rgba(45, 106, 79, 0.09);
  border-radius: 7px;
  background: rgba(247, 250, 249, 0.82);
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, transform 160ms ease;
}

.dashboard-todo-list button:hover {
  background: rgba(231, 242, 237, 0.88);
  transform: translateX(3px);
}

.dashboard-todo-list span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--leaf);
  border-radius: 7px;
  background: rgba(45, 106, 79, 0.11);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-todo-list strong {
  font-size: 13px;
}

.dashboard-todo-list b {
  color: var(--clay);
  font-size: 12px;
}

.dashboard-category-chart {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.dashboard-category-donut {
  display: grid;
  width: 124px;
  height: 124px;
  place-items: center;
  border-radius: 50%;
}

.dashboard-category-donut span {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
}

.dashboard-category-donut strong {
  color: var(--leaf-dark);
  font-size: 23px;
  line-height: 1;
}

.dashboard-category-donut small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.dashboard-category-legend {
  display: grid;
  gap: 7px;
}

.dashboard-category-legend span {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  color: #64736d;
  font-size: 12px;
}

.dashboard-category-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dashboard-category-legend b {
  color: var(--leaf-dark);
  font-size: 12px;
}

.dashboard-recent-section .dashboard-feed-row {
  padding-block: 9px;
}

.dashboard-comment-section .dashboard-comment-row {
  padding-block: 8px;
}

@media (max-width: 1380px) {
  .dashboard-workbench-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-trend-section {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .admin-dashboard > .dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-workbench-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-trend-section {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .admin-dashboard > .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-workbench-grid {
    padding: 14px;
  }

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

.comment-reply {
  margin-top: 12px;
  padding: 12px;
  border-left: 4px solid var(--leaf);
  border-radius: 8px;
  background: rgba(45, 106, 79, 0.08);
}

.comment-reply strong {
  color: var(--leaf-dark);
}

.about-card {
  padding: clamp(20px, 4vw, 44px);
}

.about-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.about-hero img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 8px 8px 0 rgba(196, 154, 56, 0.24);
}

.about-hero h1 {
  margin: 4px 0 8px;
}

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

.friend-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.58);
}

.friend-card span {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  body[data-template="magazine"] .site-filter,
  body[data-template="magazine"] .front-post-list,
  body[data-template="magazine"] .front-post-card:first-child,
  .transfer-panel {
    grid-template-columns: 1fr;
  }
}

/* Moedog / Kratos inspired public theme */
.public-page {
  --moe-ink: #333;
  --moe-muted: #777;
  --moe-line: #e8e8e8;
  --moe-card: rgba(255, 255, 255, 0.88);
  --moe-card-solid: #fff;
  --moe-blue: #3f9fd9;
  --moe-dark: #23282d;
  background:
    linear-gradient(rgba(255,255,255,0.18), rgba(255,255,255,0.18)),
    url("https://images.unsplash.com/photo-1493246507139-91e8fad9978e?auto=format&fit=crop&w=2400&q=82") center / cover fixed;
  color: var(--moe-ink);
  font-family: "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
}

.public-page .site-hero {
  min-height: 430px;
  padding: 0;
  color: #fff;
  background:
    linear-gradient(rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.28)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=2400&q=86") center / cover no-repeat !important;
  border-bottom: 0;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

.public-page .site-hero,
.detail-public .anime-detail-hero {
  padding-top: 60px;
}

.public-page .site-hero::after {
  display: none;
}

.public-page .site-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 100%;
  max-width: none;
  min-height: 60px;
  margin: 0;
  padding: 0 max(22px, calc((100vw - 1140px) / 2));
  color: #303133;
  background: rgba(255, 255, 255, 0.68);
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
  box-shadow: 0 2px 10px rgba(40, 46, 58, 0.14);
  backdrop-filter: blur(6px);
}

.public-page .site-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  position: relative;
  min-height: 60px;
  width: auto;
  min-width: auto;
  margin-right: 10px;
  padding-right: 18px;
  overflow: visible;
  color: #303133;
  font-size: 20px;
  font-weight: 600;
}

.public-page .site-logo::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 1px;
  height: 20px;
  background: rgba(148, 163, 184, 0.55);
  transform: translateY(-50%);
}

.public-page .site-logo::before {
  content: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 7px;
  color: #fff;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  font-size: 13px;
}

.public-page .site-logo .nav-svg-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: currentColor;
}

.public-page .admin-entry .nav-svg-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: currentColor;
}

.public-page .site-nav-links {
  gap: 0;
}

.public-page .admin-entry,
.public-page .back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 60px;
  padding: 0 14px;
  color: #606266;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  white-space: nowrap;
  line-height: 1;
}

.public-page .admin-entry:hover,
.public-page .back-link:hover {
  color: var(--moe-blue);
  background: rgba(63, 159, 217, 0.08);
}

.public-page .site-hero-content {
  max-width: 1140px;
  margin: 0 auto;
  padding: 110px 22px 92px;
  text-align: center;
}

.public-page .site-hero-content h1 {
  max-width: 900px;
  margin: 10px auto 14px;
  color: #fff;
  font-family: "Noto Serif SC", "Microsoft YaHei", serif;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.18;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.32);
}

.public-page .site-hero-content > p {
  max-width: 740px;
  margin: 0 auto;
  color: rgba(255,255,255,0.9);
  font-size: 17px;
  line-height: 1.9;
  text-shadow: 0 2px 10px rgba(0,0,0,0.28);
}

.public-page .site-hero-content .hero-typed-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin: 0 auto 12px;
  padding: 0;
  color: rgba(238, 245, 255, 0.92);
  background: transparent;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
  font-size: 1.15em;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
  animation: typedTitleScale 1s ease both;
}

.hero-typed-cursor {
  display: inline-block;
  width: auto;
  height: auto;
  margin-left: 2px;
  color: rgba(238, 245, 255, 0.92);
  background: transparent;
  font: inherit;
  animation: typedCursorBlink 0.72s infinite;
}

@keyframes typedCursorBlink {
  0%,
  45% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
  }
}

@keyframes typedTitleScale {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.public-page .eyebrow {
  color: var(--moe-blue);
  font-size: 13px;
  font-weight: 700;
}

.public-page .site-hero-content .eyebrow {
  color: rgba(255,255,255,0.9);
}

.public-page .hero-stats {
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.public-page .hero-stats span {
  color: #fff;
  border: 1px solid rgba(255,255,255,0.26);
  background: rgba(0,0,0,0.24);
  backdrop-filter: blur(5px);
}

.public-page .hero-stats strong {
  color: #fff;
}

.public-page .site-notice {
  max-width: 720px;
  margin: 22px auto 0;
  color: #fff;
  border-color: rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.24);
}

.public-page .site-main {
  width: min(1140px, calc(100% - 32px));
  margin: 34px auto 48px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 28px;
}

.public-page .site-feed,
.public-page .site-filter {
  background: transparent;
}

.public-page .site-filter {
  position: sticky;
  top: 22px;
  order: 2;
  padding: 0;
  border-left: 0;
}

.public-page .site-feed {
  order: 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.public-page .feed-header {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--moe-line);
  border-radius: 6px;
  background: var(--moe-card);
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}

.public-page .feed-header h2 {
  color: var(--moe-ink);
  font-family: "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  font-size: 20px;
}

.public-page #frontPostCount {
  color: var(--moe-muted);
  font-size: 13px;
}

.public-page .front-post-list {
  display: grid;
  gap: 18px;
}

.public-page .front-post-card,
.public-page .front-post-card:first-child,
body[data-template="compact"].public-page .front-post-card:first-child,
body[data-template="magazine"].public-page .front-post-card:first-child {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 0.58fr);
  min-height: 202px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--moe-line);
  border-radius: 6px;
  background: var(--moe-card);
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.public-page .front-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.public-page .front-cover,
.public-page .front-post-card:first-child .front-cover,
body[data-template="compact"].public-page .front-post-card:first-child .front-cover,
body[data-template="magazine"].public-page .front-post-card:first-child .front-cover {
  display: block;
  min-height: 202px;
  background-size: cover;
  background-position: center;
  border-radius: 0;
  transition: transform 220ms ease;
}

.public-page .front-post-card:hover .front-cover {
  transform: scale(1.035);
}

.public-page .front-post-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 20px 22px 16px;
}

.public-page .post-meta {
  order: 3;
  margin: auto 0 0;
  padding-top: 14px;
  color: var(--moe-muted);
  border-top: 1px solid var(--moe-line);
  font-size: 12px;
  font-weight: 400;
}

.public-page .front-post-content h3,
.public-page .front-post-card:first-child h3,
body[data-template="compact"].public-page .front-post-card:first-child h3,
body[data-template="magazine"].public-page .front-post-card:first-child h3 {
  margin: 0 0 10px;
  color: var(--moe-ink);
  font-family: "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  font-size: 22px;
  line-height: 1.42;
}

.public-page .front-post-content h3 a:hover {
  color: var(--moe-blue);
}

.public-page .front-post-content p {
  margin: 0 0 12px;
  color: #666;
  font-size: 14px;
  line-height: 1.8;
}

.public-page .post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.public-page .post-tags span {
  padding: 3px 7px;
  color: #fff;
  border: 0;
  border-radius: 3px;
  background: var(--moe-blue);
  font-size: 12px;
}

.public-page .search-box,
.public-page .tag-panel {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--moe-line);
  border-radius: 6px;
  background: var(--moe-card);
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}

.public-page .search-box label,
.public-page .tag-panel > p {
  position: relative;
  margin: 0 0 12px;
  padding-left: 12px;
  color: #444;
  font-size: 15px;
  font-weight: 700;
}

.public-page .search-box label::before,
.public-page .tag-panel > p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: var(--moe-blue);
}

.public-page .search-box input,
.public-page .tag-panel input,
.public-page .tag-panel select {
  min-height: 38px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: rgba(255,255,255,0.9);
  font-size: 14px;
}

.public-page .tag-button {
  min-height: 30px;
  padding: 5px 10px;
  color: #555;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: rgba(255,255,255,0.86);
  font-size: 13px;
}

.public-page .tag-button:hover,
.public-page .tag-button.active {
  color: #fff;
  border-color: var(--moe-blue);
  background: var(--moe-blue);
}

.public-page .side-list {
  gap: 0;
}

.public-page .side-list a {
  display: block;
  padding: 10px 0;
  color: #555;
  border: 0;
  border-bottom: 1px dashed #ddd;
  border-radius: 0;
  background: transparent;
}

.public-page .side-list a:hover {
  color: var(--moe-blue);
  background: transparent;
}

.public-page .side-list strong {
  font-size: 14px;
}

.public-page .side-list span {
  margin-top: 3px;
  color: #888;
  font-size: 12px;
}

.public-page .pagination {
  margin-top: 22px;
  justify-content: center;
}

.public-page .pagination button,
.public-page .ghost-button,
.public-page .save-button {
  min-height: 36px;
  border-radius: 4px;
  box-shadow: none;
}

.detail-public,
.about-public {
  background:
    linear-gradient(rgba(255,255,255,0.2), rgba(255,255,255,0.2)),
    url("https://images.unsplash.com/photo-1493246507139-91e8fad9978e?auto=format&fit=crop&w=2400&q=82") center / cover fixed;
}

.detail-public .detail-page,
.about-public .detail-page {
  width: min(920px, calc(100% - 32px));
  margin: 34px auto 48px;
}

.detail-public .detail-actions,
.about-public .detail-actions {
  padding: 0;
  border: 0;
}

.detail-public .detail-actions .back-link,
.about-public .detail-actions .back-link {
  min-height: 36px;
  margin: 0 6px 10px 0;
  padding: 7px 12px;
  color: #fff;
  border-radius: 4px;
  background: rgba(35, 40, 45, 0.88);
}

.detail-public .article-view,
.about-public .article-view,
.detail-public .comments-panel,
.about-public .comments-panel {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--moe-line);
  border-radius: 6px;
  background: var(--moe-card);
  box-shadow: 0 1px 10px rgba(0,0,0,0.1);
}

.detail-public .article-cover {
  display: block;
  min-height: clamp(240px, 38vw, 420px);
  margin: calc(clamp(22px, 4vw, 34px) * -1) calc(clamp(22px, 4vw, 34px) * -1) 24px;
  border-radius: 6px 6px 0 0;
}

.detail-public .article-view h1,
.about-public .article-view h1 {
  color: #333;
  font-family: "Noto Serif SC", "Microsoft YaHei", serif;
  font-size: clamp(32px, 5vw, 52px);
}

.detail-public .article-content,
.about-public .article-content,
.detail-public .article-content p,
.about-public .article-content p {
  color: #444;
  font-size: 16px;
  line-height: 1.95;
}

.detail-public .comments-panel,
.about-public .comments-panel {
  margin-top: 20px;
}

  .detail-public .comment-form,
  .detail-public .comment-card,
  .about-public .about-card,
  .about-public .friend-card {
    border-color: var(--moe-line);
    background: rgba(255,255,255,0.72);
    box-shadow: none;
  }

.public-page .front-post-content .post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: auto -22px -16px;
  padding: 11px 14px;
  color: #444;
  border-top: 1px solid var(--moe-line);
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.4;
}

.public-page .front-post-content .post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.public-page .meta-icon {
  display: inline-block;
  flex: 0 0 auto;
}

.public-page .calendar-icon {
  position: relative;
  width: 13px;
  height: 13px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
}

.public-page .calendar-icon::before {
  content: "";
  position: absolute;
  left: -1.8px;
  right: -1.8px;
  top: 2.8px;
  border-top: 1.8px solid currentColor;
}

.public-page .calendar-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: -3.6px;
  height: 4px;
  border-left: 1.8px solid currentColor;
  border-right: 1.8px solid currentColor;
}

.public-page .front-post-content .post-meta .read-more {
  margin-left: auto;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
}

.public-page .front-post-content .post-meta .read-more:hover {
  color: var(--moe-blue);
}

.public-footer {
  width: 100%;
  margin: 54px 0 0;
  padding: 18px max(22px, calc((100vw - 1140px) / 2));
  color: #606266;
  border: 0;
  border-top: 1px solid rgba(226, 232, 240, 0.78);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 2px 10px rgba(40, 46, 58, 0.12);
  backdrop-filter: blur(6px);
  text-align: center;
}

.public-footer div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin-bottom: 0;
}

.public-footer strong {
  position: relative;
  color: #303133;
  font-weight: 700;
}

.public-footer strong::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 14px;
  margin-left: 14px;
  background: rgba(148, 163, 184, 0.5);
  vertical-align: -2px;
}

.public-footer p {
  margin: 0;
  font-size: 13px;
}

.public-footer .site-runtime {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0 0 10px;
  color: #606266;
  font-size: 14px;
  letter-spacing: 0;
}

.runtime-signal {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7ee0a3;
  box-shadow: 0 0 12px rgba(126, 224, 163, 0.56);
}

.runtime-signal::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  border: 1px solid rgba(126, 224, 163, 0.34);
  animation: runtimeSignalPulse 2.2s ease-out infinite;
}

.public-footer .runtime-clock {
  color: #303133;
  font-variant-numeric: tabular-nums;
}

.runtime-love {
  position: relative;
  display: inline-grid;
  width: 34px;
  height: 26px;
  margin-left: 2px;
  place-items: center;
  transform-origin: center;
  animation: runtimeLoveBeat 1.9s ease-in-out infinite;
}

.runtime-love svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 2px 5px rgba(255, 0, 25, 0.28)) drop-shadow(0 0 8px rgba(255, 0, 25, 0.18));
}

.runtime-love .love-fill {
  fill: #ff0618;
}

.runtime-love .love-ecg {
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 1px rgba(120, 0, 10, 0.22));
  stroke-dasharray: 45;
  stroke-dashoffset: 45;
  animation: runtimeEcgDraw 1.9s ease-in-out infinite;
}

.runtime-love::after {
  content: "";
  position: absolute;
  inset: 5px 3px 0;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 0, 25, 0.24), transparent 68%);
  filter: blur(6px);
  opacity: 0.58;
  transform: translateY(5px);
  z-index: -1;
}

@keyframes runtimeLoveBeat {
  0%, 100% { transform: translateY(0) scale(1); }
  16% { transform: translateY(-0.5px) scale(1.12); }
  28% { transform: translateY(0) scale(0.98); }
  42% { transform: translateY(-0.5px) scale(1.06); }
  58% { transform: translateY(0) scale(1); }
}

@keyframes runtimeEcgDraw {
  0%, 18% { stroke-dashoffset: 45; }
  52%, 100% { stroke-dashoffset: 0; }
}

@keyframes runtimeSignalPulse {
  0% {
    opacity: 0.58;
    transform: scale(0.8);
  }
  76%, 100% {
    opacity: 0;
    transform: scale(1.9);
  }
}

@media (prefers-reduced-motion: reduce) {
  .runtime-signal::after,
  .runtime-love,
  .runtime-love .love-ecg,
  .runtime-love::after {
    animation: none;
  }
}

@media (max-width: 500px) {
  .public-footer div {
    display: grid;
    gap: 4px;
    padding: 0 12px;
  }
}

@media (max-width: 980px) {
  .public-page .site-main,
  body[data-template="magazine"].public-page .site-main {
    grid-template-columns: 1fr;
  }

  .public-page .site-filter {
    position: static;
    order: 2;
  }
}

@media (max-width: 700px) {
  .public-page {
    background-attachment: scroll;
  }

  .public-page .site-hero {
    min-height: 360px;
  }

  .public-page .site-nav {
    padding: 0 14px 12px;
  }

  .public-page .site-logo {
    min-height: 54px;
  }

  .public-page .site-nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .public-page .admin-entry {
    min-height: 34px;
    padding: 5px 9px;
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
  }

  .public-page .site-hero-content {
    padding: 66px 16px 54px;
  }

  .public-page .site-main {
    width: min(100% - 24px, 680px);
    margin-top: 24px;
  }

  .public-page .front-post-card,
  .public-page .front-post-card:first-child,
  body[data-template="compact"].public-page .front-post-card:first-child,
  body[data-template="magazine"].public-page .front-post-card:first-child {
    grid-template-columns: 1fr;
  }

  .public-page .front-cover,
  .public-page .front-post-card:first-child .front-cover,
  body[data-template="compact"].public-page .front-post-card:first-child .front-cover,
  body[data-template="magazine"].public-page .front-post-card:first-child .front-cover {
    min-height: 210px;
  }

  .public-page .feed-header {
    align-items: flex-start;
  }

  .detail-public,
  .about-public {
    background-attachment: scroll;
  }
}

/* Compact the Moedog-style hero so content appears sooner */
.public-page .site-hero {
  min-height: 300px;
}

.public-page .site-nav {
  min-height: 60px;
}

.public-page .site-logo,
.public-page .admin-entry,
.public-page .back-link {
  min-height: 60px;
}

.public-page .site-logo {
  font-size: 18px;
}

.public-page .site-hero-content {
  padding: 58px 22px 54px;
}

.public-page .site-hero-content h1 {
  color: transparent;
  background: linear-gradient(100deg, #ffffff 0%, #fff0f7 32%, #ff9bc7 45%, #e6c4ff 50%, #ff9bc7 55%, #fff0f7 68%, #ffffff 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(34px, 4.6vw, 54px);
  text-shadow:
    0 0 8px rgba(255, 235, 247, 0.94),
    0 0 22px rgba(232, 150, 255, 0.56);
  animation: heroTitleShine 4.8s linear infinite, heroTitleGlow 2.2s ease-in-out infinite alternate;
}

@keyframes heroTitleShine {
  0%,
  100% {
    background-position: 110% 50%;
  }

  50% {
    background-position: -10% 50%;
  }
}

@keyframes heroTitleGlow {
  from {
    filter: drop-shadow(0 0 3px rgba(255, 155, 199, 0.42));
  }

  to {
    filter: drop-shadow(0 0 11px rgba(232, 150, 255, 0.9));
  }
}

.public-page .site-hero-content > p {
  color: transparent;
  background: linear-gradient(100deg, #ffffff 0%, #ffffff 34%, #ffd65a 46%, #fff3a6 50%, #ffd65a 54%, #ffffff 66%, #ffffff 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  text-shadow:
    0 0 6px rgba(255, 247, 201, 0.88),
    0 0 16px rgba(255, 213, 90, 0.58);
  animation: heroSubtitleShine 3.6s linear infinite, heroSubtitleGlow 1.8s ease-in-out infinite alternate;
}

.public-page .site-hero-content .hero-typed-line {
  color: rgba(238, 245, 255, 0.92);
  background: transparent;
  -webkit-background-clip: initial;
  background-clip: initial;
  animation: typedTitleScale 1s ease both;
}

@media (min-width: 768px) {
  .public-page .site-hero-content .hero-typed-line {
    font-size: 1.72em;
  }
}

@keyframes heroSubtitleShine {
  0%,
  100% {
    background-position: 110% 50%;
  }

  50% {
    background-position: -10% 50%;
  }
}

@keyframes heroSubtitleGlow {
  from {
    filter: drop-shadow(0 0 2px rgba(255, 214, 90, 0.42));
  }

  to {
    filter: drop-shadow(0 0 9px rgba(255, 214, 90, 0.92));
  }
}

.public-page .hero-stats {
  margin-top: 18px;
}

.public-page .hero-stats span {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 13px;
}

.public-page .site-main {
  margin-top: 24px;
}

@media (max-width: 700px) {
  .public-page .site-hero {
    min-height: 300px;
  }

  .public-page .site-hero-content {
    padding: 44px 16px 42px;
  }

  .public-page .site-hero-content h1 {
    font-size: clamp(30px, 10vw, 44px);
  }
}

/* Use local img folder as the public website background */
.public-page,
.detail-public,
.about-public {
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url("/img/12.jpg") center / cover fixed !important;
}

.public-page .site-hero {
  background:
    linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.32)),
    url("/img/12.jpg") center / cover no-repeat !important;
}

@media (max-width: 700px) {
  .public-page,
  .detail-public,
  .about-public {
    background-attachment: scroll !important;
  }
}

/* Public polish: configurable background, unified icons, profile sidebar, mobile details */
:root {
  --site-bg-image: url("/img/12.jpg");
}

.public-page,
.detail-public,
.about-public {
  background: var(--site-bg-image) center / cover fixed !important;
}

.public-page .site-filter {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.public-page .site-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.32)),
    var(--site-bg-image) center / cover no-repeat !important;
}

.hero-wave {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  z-index: 4;
  height: 5rem;
  overflow: hidden;
  pointer-events: none;
}

.hero-wave-svg {
  display: block;
  width: 100%;
  height: 5rem;
}

.hero-wave-parallax > use {
  animation: heroWaveMove 18s linear infinite;
  will-change: transform;
}

.hero-wave-parallax > use:nth-child(1) {
  fill: rgba(255, 255, 255, 0.7);
  animation-delay: -2s;
  animation-duration: 7s;
}

.hero-wave-parallax > use:nth-child(2) {
  fill: rgba(255, 255, 255, 0.5);
  animation-delay: -3s;
  animation-duration: 10s;
}

.hero-wave-parallax > use:nth-child(3) {
  fill: rgba(255, 255, 255, 0.3);
  animation-delay: -4s;
  animation-duration: 13s;
}

.hero-wave-parallax > use:nth-child(4) {
  fill: #f9fafb;
  animation-delay: -5s;
  animation-duration: 20s;
}

@keyframes heroWaveMove {
  from {
    transform: translateX(-90px);
  }

  to {
    transform: translateX(85px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .public-page .site-hero-content > p {
    animation: none;
  }

  .public-page .site-hero-content h1 {
    animation: none;
  }
}

.profile-card {
  position: relative;
  overflow: hidden;
  margin: 0 0 18px;
  padding: 0 16px 16px;
  border: 1px solid var(--moe-line);
  border-radius: 6px;
  background: var(--moe-card);
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
  text-align: center;
}

.profile-cover {
  height: 76px;
  margin: 0 -16px 0;
  background:
    linear-gradient(rgba(35, 40, 45, 0.15), rgba(35, 40, 45, 0.45)),
    var(--site-bg-image) center / cover;
}

.profile-card img {
  width: 76px;
  height: 76px;
  margin-top: -38px;
  border: 3px solid rgba(255,255,255,0.92);
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 5px 16px rgba(0,0,0,0.16);
  cursor: pointer;
}

.profile-card h3 {
  margin: 8px 0 6px;
  color: #333;
  font-size: 20px;
}

.profile-card p {
  margin: 0 auto 14px;
  max-width: 230px;
  color: #666;
  font-size: 13px;
  line-height: 1.7;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--moe-line);
}

.profile-stats span {
  color: #777;
  font-size: 12px;
}

.profile-stats strong {
  display: block;
  color: #333;
  font-size: 18px;
}

.profile-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--moe-line);
}

.profile-social {
  border: 1px solid rgba(226, 232, 240, 0.88);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 96px;
  min-height: 38px;
  padding: 0 13px;
  color: #333;
  cursor: pointer;
  font: inherit;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 8px 18px rgba(40, 46, 58, 0.06);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  padding: 10px 16px;
  color: #fff;
  border-radius: 999px;
  background: rgba(35, 40, 45, 0.9);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.copy-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.profile-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.profile-social img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.profile-social-qq svg {
  width: 20px;
  height: 20px;
}

.profile-social-qq img {
  width: 20px;
  height: 20px;
}

.profile-card .profile-social .profile-social-icon,
.public-page .profile-card .profile-social .profile-social-icon,
.detail-public .profile-card .profile-social .profile-social-icon {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: inherit;
  object-fit: contain;
  transform: none;
}

.public-page .profile-card .profile-social .profile-social-icon:hover,
.detail-public .profile-card .profile-social .profile-social-icon:hover {
  box-shadow: none;
  transform: none;
}

.profile-social span {
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.profile-social:hover {
  transform: translateY(-2px);
}

.profile-social-github {
  color: #24292f;
}

.profile-social-github:hover {
  color: #fff;
  border-color: rgba(36, 41, 47, 0.2);
  background: linear-gradient(135deg, #24292f 0%, #59636e 100%);
  box-shadow: 0 12px 24px rgba(36, 41, 47, 0.22);
}

.profile-social-qq {
  min-width: 0;
  padding-right: 11px;
  padding-left: 11px;
  color: #24292f;
}

.profile-social-qq span {
  font-size: 12px;
  white-space: nowrap;
}

.profile-social-qq:hover {
  color: #fff;
  border-color: rgba(255, 106, 160, 0.2);
  background: linear-gradient(135deg, #ff6aa0 0%, #ff8cc8 100%);
  box-shadow: 0 12px 24px rgba(255, 106, 160, 0.24);
}

.miss-you-card {
  overflow: hidden;
  margin: 0 0 18px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #f6f8fc 100%);
  box-shadow: 8px 8px 22px rgba(55, 99, 170, 0.12), -8px -8px 22px rgba(255, 255, 255, 0.9);
}

.miss-you-board {
  display: grid;
  min-height: 3.5rem;
  place-items: center;
  background: linear-gradient(135deg, #0f47dc 0%, #0b35bf 100%);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.15rem;
}

.miss-you-board {
  position: relative;
}

.miss-you-board::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.18) 48%, transparent 72%);
  transform: translateX(-110%);
  animation: signage-shine 4.8s ease-in-out infinite;
}

.miss-you-board span {
  position: relative;
  z-index: 1;
  display: block;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

.miss-you-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.95rem;
  padding: 0 13px;
  color: #30333a;
  font-size: 0.92rem;
  font-weight: 500;
}

.miss-you-side {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 34px;
}

.miss-you-east {
  justify-content: flex-end;
}

.miss-you-center {
  flex: 1;
  min-width: 0;
  padding: 0 8px;
  color: #3b3f47;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-arrow {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.route-arrow.left {
  border-right: 9px solid #3f4148;
}

.route-arrow.right {
  border-left: 9px solid #3f4148;
}

@keyframes signage-shine {
  0%,
  55% {
    transform: translateX(-110%);
  }
  78%,
  100% {
    transform: translateX(110%);
  }
}

.detail-profile-card {
  margin: 0;
}

.public-page .meta-icon,
.detail-public .meta-icon {
  position: relative;
  display: inline-block;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: currentColor;
}

.public-page .comment-icon,
.detail-public .comment-icon {
  border: 1.8px solid currentColor;
  border-radius: 50%;
}

.public-page .comment-icon::after,
.detail-public .comment-icon::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: -3px;
  width: 5px;
  height: 5px;
  border-left: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(-18deg);
}

.public-page .eye-icon,
.detail-public .eye-icon {
  width: 17px;
  height: 11px;
  margin-top: 1px;
  border: 1.8px solid currentColor;
  border-radius: 50% / 62%;
}

.public-page .eye-icon::after,
.detail-public .eye-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.public-page .like-icon::before,
.detail-public .like-icon::before,
.public-page .star-icon::before,
.detail-public .star-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 9px;
  height: 9px;
  border: 1.8px solid currentColor;
  transform: rotate(45deg);
}

.public-page .user-icon::before,
.detail-public .user-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 7px;
  height: 7px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}

.public-page .user-icon::after,
.detail-public .user-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 1px;
  width: 11px;
  height: 6px;
  border: 1.8px solid currentColor;
  border-radius: 8px 8px 2px 2px;
  border-bottom: 0;
}

.public-page .arrow-icon,
.detail-public .arrow-icon {
  width: 13px;
  height: 13px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}

.public-page .arrow-icon::after,
.detail-public .arrow-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 4px;
  height: 4px;
  border-top: 1.8px solid currentColor;
  border-right: 1.8px solid currentColor;
  transform: rotate(45deg);
}

.detail-public .article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  align-items: center;
  color: #666;
}

.detail-public .article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.article-toc {
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid var(--moe-line);
  border-radius: 6px;
  background: rgba(255,255,255,0.58);
}

.article-toc strong {
  display: block;
  margin-bottom: 10px;
  color: #333;
}

.article-toc a {
  display: block;
  padding: 6px 0;
  color: #555;
  text-decoration: none;
}

.article-toc a.h3 {
  padding-left: 18px;
  color: #777;
  font-size: 14px;
}

.article-toc a:hover {
  color: var(--moe-blue);
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: center;
  margin: 30px -4px 0;
}

.article-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 4px;
  background: var(--anime-blue);
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.article-nav a:hover {
  background: #59b7ed;
  box-shadow: 0 10px 18px rgba(63, 159, 217, 0.22);
  transform: translateY(-1px);
}

.article-nav a:first-child {
  justify-self: start;
}

.article-nav a:last-child,
.article-nav .article-nav-next {
  justify-self: end;
  text-align: right;
}

.article-nav span {
  display: block;
}

@media (max-width: 700px) {
  .public-page,
  .detail-public,
  .about-public {
    background-attachment: scroll !important;
  }

  .public-page .site-main {
    gap: 18px;
  }

  .public-page .site-filter {
    display: grid;
    gap: 14px;
  }

  .public-page .front-post-content {
    padding: 16px;
  }

  .public-page .front-post-content .post-meta {
    margin: auto -16px -16px;
    padding: 10px 12px;
    gap: 8px 12px;
    font-size: 12px;
  }

  .public-page .front-post-content .post-meta .read-more {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }

  .profile-card {
    order: -1;
  }

  .detail-public .article-view,
  .about-public .article-view,
  .detail-public .comments-panel,
  .about-public .comments-panel {
    padding: 18px;
  }

  .detail-public .article-cover {
    margin: -18px -18px 18px;
  }

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

  .article-nav a:last-child {
    text-align: right;
  }
}

/* Article detail Kratos-style layout */
.detail-public .detail-hero {
  min-height: 260px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.34)),
    var(--detail-hero-image, var(--site-bg-image)) center / cover no-repeat !important;
}

.detail-public .detail-hero-content {
  padding: 54px 22px 42px;
}

.detail-public .detail-hero-content h1 {
  max-width: 920px;
  font-size: clamp(34px, 5vw, 58px);
}

.detail-public .detail-hero-content > p:last-child {
  max-width: 760px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  gap: 22px;
  align-items: start;
  width: min(1080px, calc(100% - 32px));
  margin: 22px auto 52px;
}

.detail-content-column {
  min-width: 0;
}

.detail-sidebar {
  position: sticky;
  top: 22px;
  align-self: start;
}

.detail-public .detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.detail-public .detail-actions .back-link {
  min-height: 38px;
  margin-bottom: 0;
  padding: 0 14px;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: rgba(35, 40, 45, 0.82);
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}

.detail-public .article-view,
.detail-public .comments-panel {
  overflow: hidden;
  border: 1px solid var(--moe-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.detail-public .article-view {
  padding: 28px 32px 32px;
}

.detail-public .article-view > :not(.article-cover) {
  margin-left: 0;
  margin-right: 0;
}

.detail-public .article-meta {
  margin-top: 0;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--moe-line);
  font-size: 13px;
}

.detail-public .article-view h1 {
  margin: 0 0 12px;
  color: #222;
  font-family: "Noto Serif SC", "Microsoft YaHei", serif;
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.25;
}

.detail-public .article-summary {
  margin: 0 0 20px;
  padding: 14px 16px;
  color: #666;
  border-left: 4px solid var(--moe-blue);
  border-radius: 4px;
  background: rgba(63, 159, 217, 0.08);
  line-height: 1.8;
}

.detail-public .article-tags {
  margin-bottom: 22px;
}

.detail-public .article-content {
  color: #333;
  font-size: 16px;
  line-height: 2;
}

.detail-public .article-content p,
.detail-public .article-content ul,
.detail-public .article-content ol,
.detail-public .article-content blockquote {
  font-size: 16px;
  line-height: 2;
}

.detail-public .article-content h2,
.detail-public .article-content h3 {
  margin: 30px 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--moe-blue);
  color: #222;
}

.detail-public .article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 720px;
  margin: 18px auto;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  object-fit: contain;
}

.detail-public .comments-panel {
  grid-column: 1;
  padding: 24px;
}

.detail-public .comments-panel .feed-header {
  margin: 0 0 18px;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid var(--moe-line);
  background: transparent;
  box-shadow: none;
}

.detail-public .comment-form {
  display: grid;
  grid-template-columns: minmax(160px, 0.34fr) minmax(0, 0.66fr);
  gap: 12px;
}

.detail-public .comment-form textarea,
.detail-public .comment-form .save-button,
.detail-public #commentStatus {
  grid-column: 1 / -1;
}

.detail-public .comment-form input,
.detail-public .comment-form textarea {
  border-radius: 6px;
}

.detail-sidebar .tag-panel {
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.94);
}

@media (max-width: 960px) {
  .detail-layout {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .detail-sidebar {
    position: static;
    order: 2;
  }

  .detail-comments {
    order: 3;
    grid-column: 1;
  }
}

@media (max-width: 700px) {
  .detail-public .detail-hero {
    min-height: 220px;
  }

  .detail-public .detail-hero-content {
    padding: 36px 18px 30px;
  }

  .detail-layout {
    width: min(100% - 22px, 1140px);
    gap: 18px;
  }

  .detail-public .article-view {
    padding: 20px 18px 22px;
  }

  .detail-public .comments-panel {
    padding: 18px;
  }

  .detail-public .article-content img {
    max-height: none;
    margin: 14px auto;
  }

  .detail-public .comment-form {
    grid-template-columns: 1fr;
  }
}

/* Restore classic article detail page */
.detail-public .detail-page {
  width: min(920px, calc(100% - 32px));
  margin: 34px auto 48px;
  padding: 0;
}

.detail-public .detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.detail-public .detail-actions .back-link {
  min-height: 36px;
  margin: 0 6px 10px 0;
  padding: 7px 12px;
  color: #fff;
  border: 0;
  border-radius: 4px;
  background: rgba(35, 40, 45, 0.88);
}

.detail-public .article-view,
.detail-public .comments-panel {
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--moe-line);
  border-radius: 6px;
  background: var(--moe-card);
  box-shadow: 0 1px 10px rgba(0,0,0,0.1);
}

.detail-public .article-cover {
  display: block;
  min-height: clamp(240px, 38vw, 420px);
  margin: calc(clamp(22px, 4vw, 34px) * -1) calc(clamp(22px, 4vw, 34px) * -1) 24px;
  border-radius: 6px 6px 0 0;
  background-position: center;
  background-size: cover;
}

.detail-public .article-view > :not(.article-cover) {
  margin-left: 0;
  margin-right: 0;
}

.detail-public .article-meta {
  margin-top: 0;
  margin-bottom: 12px;
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-public .article-view h1 {
  margin: 12px 0 16px;
  color: #333;
  font-family: "Noto Serif SC", "Microsoft YaHei", serif;
  font-size: clamp(32px, 5vw, 52px);
}

.detail-public .article-summary {
  margin: 0 0 20px;
  padding: 0;
  color: #666;
  border-left: 0;
  background: transparent;
  font-size: 17px;
  line-height: 1.85;
}

.detail-public .article-content,
.detail-public .article-content p,
.detail-public .article-content ul,
.detail-public .article-content ol,
.detail-public .article-content blockquote {
  color: #444;
  font-size: 16px;
  line-height: 1.95;
}

.detail-public .comments-panel {
  margin-top: 20px;
}

/* Admin editor live preview */
.live-preview-panel {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
}

.live-preview-panel .feed-header {
  margin: 0;
  padding-bottom: 8px;
}

.live-preview-panel .live-preview-article {
  max-height: 520px;
  overflow: auto;
  box-shadow: none;
}

.live-preview-panel .article-cover {
  min-height: 180px;
}

.live-preview-panel h1 {
  font-size: clamp(28px, 4vw, 42px);
}

.live-preview-panel .article-content {
  padding-bottom: 24px;
}

@media (max-width: 900px) {
  .live-preview-panel .live-preview-article {
    max-height: 420px;
  }
}

/* Final anime-style article page */
.detail-public {
  --anime-blue: #4fb2ee;
  --anime-line: rgba(0, 0, 0, 0.08);
  min-height: 100vh;
  background: #f5f7fb !important;
  font-family: "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
}

.anime-detail-hero {
  margin-top: 60px;
  min-height: 265px;
  color: #fff;
  background:
    linear-gradient(rgba(16, 31, 48, 0.22), rgba(16, 31, 48, 0.16)),
    var(--detail-hero-image, var(--site-bg-image)) center / cover no-repeat;
  box-shadow: 0 2px 14px rgba(0,0,0,0.12);
}

.anime-topbar {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 60px;
  padding: 0 max(22px, calc((100vw - 1140px) / 2));
  color: #303133;
  background: rgba(255, 255, 255, 0.68);
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
  box-shadow: 0 2px 10px rgba(40, 46, 58, 0.14);
  backdrop-filter: blur(6px);
}

.anime-topbar a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
  min-height: 60px;
  padding: 0 14px;
  color: #606266;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.anime-topbar a:hover {
  color: var(--moe-blue);
  background: rgba(63, 159, 217, 0.08);
}

.detail-nav-brand {
  position: relative;
  margin-right: 10px;
  padding-right: 18px !important;
  color: #303133 !important;
  font-size: 19px !important;
  font-weight: 700 !important;
}

.detail-nav-brand::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 1px;
  height: 20px;
  background: rgba(148, 163, 184, 0.55);
  transform: translateY(-50%);
}

.detail-nav-items {
  display: flex;
  align-self: stretch;
  align-items: stretch;
  margin-right: auto;
}

.nav-search-entry {
  font-size: 23px !important;
  font-weight: 400 !important;
}

.anime-topbar .nav-svg-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.anime-hero-title {
  display: grid;
  place-items: center;
  min-height: 225px;
  padding: 28px 18px 44px;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,0.28);
}

.anime-hero-title h1 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 400;
  line-height: 1.2;
}

.anime-hero-title p {
  margin: 0;
  color: rgba(255,255,255,0.94);
  font-size: clamp(16px, 2.4vw, 24px);
}

.anime-detail-wrap {
  display: grid;
  gap: 18px;
  width: min(1044px, calc(100% - 28px));
  margin: 18px auto 44px;
}

.anime-detail-upper {
  display: grid;
  grid-template-columns: minmax(0, 720px) 300px;
  gap: 24px;
  align-items: stretch;
  min-width: 0;
}

.anime-detail-sidebar {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 16px;
}

.detail-public .anime-detail-sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
}

.detail-public .anime-article-card,
.detail-public .anime-comments-card,
.anime-widget {
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 2px;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

.detail-public .anime-article-card {
  padding: 28px 28px 32px;
}

.detail-public .anime-article-card > :not(.article-cover) {
  margin-left: 0;
  margin-right: 0;
}

.detail-public .anime-article-card h1 {
  margin: 0 0 14px;
  color: #333;
  font-family: "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  font-size: clamp(28px, 4vw, 34px);
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
}

.detail-public .anime-article-card .article-meta {
  justify-content: center;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  color: #999;
  font-size: 12px;
}

.detail-public .anime-article-card .article-summary {
  margin: 0 0 22px;
  padding: 12px 14px;
  color: #666;
  border-left: 4px solid var(--anime-blue);
  background: rgba(245, 247, 250, 0.82);
  font-size: 15px;
  line-height: 1.9;
}

.detail-public .anime-article-card .article-tags {
  margin: 0 0 16px;
}

.detail-public .anime-article-card .article-content {
  color: #555;
  font-size: 15px;
  line-height: 2;
}

.detail-public .anime-article-card .article-content p,
.detail-public .anime-article-card .article-content ul,
.detail-public .anime-article-card .article-content ol,
.detail-public .anime-article-card .article-content blockquote {
  color: #555;
  font-size: 15px;
  line-height: 2;
}

.detail-public .anime-article-card .article-content h2,
.detail-public .anime-article-card .article-content h3 {
  margin: 24px -28px 16px;
  padding: 12px 28px;
  color: #444;
  border-left: 4px solid var(--anime-blue);
  background: rgba(245,247,250,0.86);
  font-size: 20px;
  font-weight: 500;
}

.detail-public .anime-article-card .article-content img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 760px;
  height: auto;
  margin: 16px auto;
  border-radius: 2px;
  box-shadow: none;
  object-fit: contain;
}

.detail-public .anime-comments-card {
  margin: 0;
  padding: 22px;
}

.detail-public .anime-comments-card .feed-header {
  margin: 0 0 16px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid var(--anime-line);
  background: transparent;
  box-shadow: none;
}

.detail-public .anime-comments-card .feed-header h2,
.anime-widget h3 {
  margin: 0;
  color: #555;
  font-size: 18px;
  font-weight: 500;
}

.detail-public .anime-comments-card .comment-form {
  display: grid;
  gap: 10px;
}

.detail-public .anime-comments-card input,
.detail-public .anime-comments-card textarea {
  border: 1px solid #ddd;
  border-radius: 0;
  background: rgba(255,255,255,0.86);
}

.detail-public .anime-comments-card .save-button {
  width: 100%;
  border-radius: 0;
  background: var(--anime-blue);
}

.detail-public .anime-comments-card {
  padding: 18px 14px 14px;
  background: rgba(255, 255, 255, 0.94);
}

.detail-public .anime-comments-card .comment-section-heading {
  display: block;
  margin: 0 0 14px;
  padding: 0;
  border-bottom: 0;
  text-align: center;
}

.detail-public .anime-comments-card .comment-section-heading h2 {
  color: #30343b;
  font-size: 24px;
  font-weight: 700;
}

.detail-public .anime-comments-card .comment-section-heading span {
  margin-left: 4px;
}

.detail-public .anime-comments-card .comment-form {
  overflow: hidden;
  gap: 0;
  grid-template-columns: 1fr;
  border: 1px solid #e1e6ef;
  background: #f4f7fd;
}

.detail-public .comment-identity-row,
.detail-public .comment-form-footer {
  grid-column: 1 / -1;
}

.detail-public .comment-identity-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid #dce2ec;
}

.detail-public .comment-identity-row input {
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid #dce2ec;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.detail-public .comment-identity-row input:last-child {
  border-right: 0;
}

.detail-public .anime-comments-card textarea#commentContent {
  min-height: 210px;
  width: calc(100% - 24px);
  margin: 0 12px;
  padding: 14px 12px;
  border: 0;
  background: #fff;
  resize: vertical;
  outline: none;
}

.detail-public .comment-form-footer {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
}

.detail-public .comment-form-tools {
  display: flex;
  gap: 7px;
}

.detail-public .comment-tool-pill {
  min-width: 62px;
  min-height: 32px;
  border: 0;
  border-radius: 18px;
  color: #737b88;
  background: #fff;
}

.detail-public .comment-tool-pill.is-active {
  color: #fff;
  background: var(--anime-blue);
}

.detail-public .comment-form-footer .ghost-button {
  min-height: 34px;
  padding: 5px 9px;
}

.detail-public .anime-comments-card .comment-form-footer .save-button {
  grid-column: auto;
  justify-self: end;
  width: auto;
  min-width: 104px;
  min-height: 40px;
  border-radius: 4px;
  padding: 8px 14px;
}

.detail-public .comment-form #commentStatus {
  margin: 0;
  padding: 0 12px 10px;
  color: #657181;
  font-size: 13px;
}

.detail-public .comment-card {
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 0;
  background: rgba(255,255,255,0.78);
  box-shadow: none;
}

.anime-widget {
  overflow: hidden;
  padding: 18px;
}

.anime-profile-widget {
  padding: 0 18px 22px;
  text-align: center;
}

.anime-widget-cover {
  height: 96px;
  margin: 0 -18px 0;
  background:
    linear-gradient(rgba(255,255,255,0.1), rgba(255,255,255,0.2)),
    var(--site-bg-image) center / cover;
}

.anime-profile-widget img {
  width: 78px;
  height: 78px;
  margin-top: -39px;
  border: 3px solid rgba(255,255,255,0.92);
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  cursor: pointer;
}

.profile-card img.avatar-spin,
.anime-profile-widget img.avatar-spin {
  animation: avatarSpinOnce 650ms ease-in-out;
}

@keyframes avatarSpinOnce {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.anime-profile-widget p {
  margin: 14px 0 0;
  color: #777;
  font-size: 13px;
  line-height: 1.8;
}

.anime-widget h3 {
  position: relative;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.anime-widget h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 64px;
  height: 2px;
  background: var(--anime-blue);
}

.anime-widget .side-list {
  display: grid;
  gap: 0;
  margin-top: 8px;
}

.anime-widget .side-list a {
  display: block;
  padding: 9px 0;
  color: #777;
  border-bottom: 1px dashed rgba(0,0,0,0.12);
  text-decoration: none;
}

.anime-widget .side-list a:hover {
  color: var(--anime-blue);
}

.anime-widget .side-list strong {
  display: block;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anime-widget .side-list span {
  display: block;
  margin-top: 3px;
  color: #aaa;
  font-size: 12px;
}

.detail-public .public-footer {
  margin-top: 28px;
  color: #606266;
  background: rgba(255, 255, 255, 0.72);
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 6px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.back-to-top img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 16px rgba(79, 178, 238, 0.32);
}

@media (max-width: 980px) {
  .anime-detail-wrap,
  .anime-detail-upper {
    grid-template-columns: 1fr;
  }

  .anime-detail-wrap {
    width: min(760px, calc(100% - 24px));
  }

  .anime-detail-sidebar {
    position: static;
  }
}

@media (max-width: 700px) {
  .anime-topbar {
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0 8px;
  }

  .anime-topbar a {
    flex: 0 0 auto;
    padding: 0 12px;
    font-size: 13px;
  }

  .anime-detail-hero {
    margin-top: 60px;
    min-height: 210px;
  }

  .anime-hero-title {
    min-height: 176px;
    padding: 24px 16px 34px;
  }

  .detail-public .anime-article-card,
  .detail-public .anime-comments-card,
  .anime-widget {
    padding: 18px;
  }

  .detail-public .anime-article-card .article-content h2,
  .detail-public .anime-article-card .article-content h3 {
    margin-left: -18px;
    margin-right: -18px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .detail-public .comment-identity-row,
  .detail-public .comment-form-footer {
    grid-template-columns: 1fr;
  }

  .detail-public .comment-identity-row input {
    border-right: 0;
    border-bottom: 1px solid #dce2ec;
  }

  .detail-public .comment-identity-row input:last-child {
    border-bottom: 0;
  }

  .detail-public .anime-comments-card textarea#commentContent {
    min-height: 160px;
  }

  .detail-public .anime-comments-card .comment-form-footer .save-button {
    width: 100%;
  }
}

/* Admin dashboard */
.admin-dashboard {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(45, 106, 79, 0.14);
  background: rgba(251, 252, 248, 0.94);
}

.dashboard-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid rgba(45, 106, 79, 0.12);
  background:
    linear-gradient(115deg, rgba(45, 106, 79, 0.1), rgba(232, 242, 232, 0.18) 58%, rgba(189, 106, 74, 0.08));
}

.dashboard-heading h2 {
  margin: 2px 0 5px;
  color: var(--leaf-dark);
  font-size: 27px;
}

.dashboard-heading-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-dashboard > .dashboard-grid {
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  gap: 12px;
  padding: 20px 22px 0;
}

.admin-dashboard .stat-card {
  position: relative;
  gap: 9px;
  min-height: 132px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(45, 106, 79, 0.1);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 5px 18px rgba(32, 64, 52, 0.06);
}

.admin-dashboard .stat-card::after {
  position: absolute;
  right: -18px;
  bottom: -25px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--stat-soft, rgba(45, 106, 79, 0.1));
  content: "";
}

.stat-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-card-icon {
  display: grid;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 7px;
  color: var(--stat-color, var(--leaf));
  background: var(--stat-soft, rgba(45, 106, 79, 0.1));
  font-size: 13px;
  font-weight: 700;
}

.admin-dashboard .stat-card strong {
  color: #253a32;
  font-size: 31px;
  line-height: 1;
}

.admin-dashboard .stat-card small {
  color: var(--muted);
  font-size: 12px;
}

.stat-card-leaf,
.stat-card-green {
  --stat-color: #2d6a4f;
  --stat-soft: rgba(45, 106, 79, 0.11);
}

.stat-card-gold {
  --stat-color: #a16d12;
  --stat-soft: rgba(221, 168, 61, 0.16);
}

.stat-card-clay {
  --stat-color: #a95f48;
  --stat-soft: rgba(189, 106, 74, 0.13);
}

.stat-card-rose {
  --stat-color: #ae596e;
  --stat-soft: rgba(189, 93, 119, 0.12);
}

.stat-card-blue {
  --stat-color: #487b98;
  --stat-soft: rgba(81, 141, 174, 0.12);
}

.stat-card-ink {
  --stat-color: #59676a;
  --stat-soft: rgba(84, 105, 108, 0.12);
}

.dashboard-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 16px;
  padding: 18px 22px 22px;
}

.dashboard-section {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(45, 106, 79, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 5px 16px rgba(32, 64, 52, 0.045);
}

.dashboard-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(45, 106, 79, 0.11);
}

.dashboard-section-heading .eyebrow {
  margin-bottom: 2px;
  font-size: 10px;
}

.dashboard-section-heading h3 {
  margin: 0;
  color: #30483f;
  font-size: 18px;
}

.dashboard-section-heading > span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-feed-list,
.dashboard-comment-list {
  display: grid;
  gap: 0;
}

.dashboard-feed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 2px;
  border-bottom: 1px dashed rgba(45, 106, 79, 0.17);
  color: #384941;
  text-decoration: none;
  transition: color 160ms ease, padding 160ms ease;
}

.dashboard-feed-row:last-child {
  border-bottom: 0;
}

.dashboard-feed-row:hover {
  padding-left: 6px;
  color: var(--leaf);
}

.dashboard-feed-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.dashboard-feed-main strong,
.dashboard-feed-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-feed-main small,
.dashboard-feed-row b small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.dashboard-feed-row b {
  flex: 0 0 auto;
  color: var(--clay);
  font-size: 16px;
}

.admin-dashboard .popular-list {
  gap: 0;
}

.admin-dashboard .popular-list a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 9px;
  padding: 11px 2px;
  border: 0;
  border-bottom: 1px dashed rgba(45, 106, 79, 0.17);
  border-radius: 0;
  color: #405049;
  background: transparent;
}

.admin-dashboard .popular-list a:last-child {
  border-bottom: 0;
}

.admin-dashboard .popular-list a:hover {
  color: var(--leaf);
}

.admin-dashboard .popular-list strong {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  color: var(--leaf-dark);
  background: rgba(45, 106, 79, 0.11);
  font-size: 12px;
}

.admin-dashboard .popular-list a:first-child strong {
  color: #fff;
  background: var(--clay);
}

.admin-dashboard .popular-list span {
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-dashboard .popular-list small {
  color: var(--muted);
  font-size: 12px;
}

.admin-dashboard .chart-list {
  gap: 8px;
}

.admin-dashboard .chart-title {
  margin: 9px 0 2px;
  color: #52675f;
  font-size: 13px;
}

.admin-dashboard .chart-title:first-child {
  margin-top: 0;
}

.admin-dashboard .chart-row {
  grid-template-columns: minmax(68px, 0.75fr) minmax(100px, 2fr) auto;
  gap: 9px;
  color: #62716c;
  font-size: 12px;
}

.admin-dashboard .chart-row div {
  height: 8px;
  background: rgba(45, 106, 79, 0.09);
}

.admin-dashboard .chart-row i {
  background: linear-gradient(90deg, #4c9777, #d2ad60);
}

.dashboard-comment-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 2px;
  border-bottom: 1px dashed rgba(45, 106, 79, 0.17);
}

.dashboard-comment-row:last-child {
  border-bottom: 0;
}

.dashboard-comment-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--leaf);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-comment-row strong {
  color: #405049;
  font-size: 14px;
}

.dashboard-comment-row p {
  display: -webkit-box;
  margin: 4px 0;
  overflow: hidden;
  color: #68756f;
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dashboard-comment-row small {
  color: var(--clay);
  font-size: 12px;
}

.admin-dashboard > #backupStatus {
  min-height: 0;
  margin: -10px 22px 18px;
}

@media (max-width: 1320px) {
  .admin-dashboard > .dashboard-grid {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }
}

@media (max-width: 900px) {
  .dashboard-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .dashboard-heading {
    align-items: stretch;
    flex-direction: column;
    padding: 20px 18px 17px;
  }

  .dashboard-actions .ghost-button {
    width: 100%;
  }

  .admin-dashboard > .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 14px 14px 0;
  }

  .admin-dashboard .stat-card {
    min-height: 116px;
    padding: 12px;
  }

  .admin-dashboard .stat-card strong {
    font-size: 27px;
  }

  .dashboard-content-grid {
    gap: 12px;
    padding: 14px;
  }

  .dashboard-section {
    padding: 14px;
  }

  .dashboard-feed-row b small {
    display: none;
  }
}

/* Gallery category manager */
.gallery-category-manager[hidden] {
  display: none;
}

.dashboard-panel.show-categories > .gallery-manager-heading,
.dashboard-panel.show-categories > .gallery-manager-stats,
.dashboard-panel.show-categories > .gallery-manager-toolbar,
.dashboard-panel.show-categories > .gallery-editor-form,
.dashboard-panel.show-categories > .gallery-table-wrap {
  display: none;
}

.gallery-category-manager {
  max-width: 820px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.gallery-category-heading {
  display: flex;
  min-height: 66px;
  padding: 14px 18px;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 250, 249, 0.82);
}

.gallery-category-heading p,
.gallery-category-heading h3 {
  margin: 0;
}

.gallery-category-heading > div:last-child {
  display: flex;
  gap: 8px;
}

.gallery-category-form {
  display: flex;
  gap: 9px;
  align-items: end;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 252, 251, 0.82);
}

.gallery-category-form[hidden] {
  display: none;
}

.gallery-category-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.gallery-category-form label:first-of-type {
  flex: 1;
}

.gallery-category-form input {
  min-height: 38px;
}

.gallery-category-form span {
  color: var(--muted);
  font-size: 12px;
}

.gallery-category-table-wrap {
  padding: 18px;
}

.gallery-category-table {
  width: 100%;
  border-collapse: collapse;
}

.gallery-category-table th,
.gallery-category-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.gallery-category-table th {
  color: var(--muted);
  background: rgba(242, 247, 245, 0.86);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.gallery-category-table tbody tr:hover {
  background: rgba(236, 245, 242, 0.72);
}

.gallery-category-table tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 700px) {
  .gallery-category-heading,
  .gallery-category-form {
    display: grid;
    align-items: stretch;
  }

  .gallery-category-heading > div:last-child {
    flex-wrap: wrap;
  }

  .gallery-category-table-wrap {
    overflow-x: auto;
    padding: 12px;
  }

  .gallery-category-table {
    min-width: 560px;
  }
}

/* Final dashboard workbench layout priority */
.admin-dashboard > .dashboard-grid {
  grid-template-columns: repeat(6, minmax(110px, 1fr));
}

.dashboard-workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(245px, 0.72fr) minmax(260px, 0.82fr);
  gap: 14px;
  padding: 18px 22px 22px;
}

.dashboard-trend-section {
  grid-column: span 2;
}

@media (max-width: 1380px) {
  .dashboard-workbench-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .admin-dashboard > .dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-workbench-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-trend-section {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .admin-dashboard > .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-workbench-grid {
    padding: 14px;
  }
}

/* Refined admin dashboard */
.admin-dashboard {
  border-color: rgba(37, 55, 49, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 247, 0.94)),
    radial-gradient(circle at 18% 0%, rgba(69, 135, 107, 0.12), transparent 34%);
  box-shadow: 0 22px 58px rgba(27, 45, 37, 0.1);
}

.dashboard-heading {
  position: relative;
  isolation: isolate;
  min-height: 174px;
  padding: 28px 30px;
  overflow: hidden;
  border-bottom-color: rgba(255, 255, 255, 0.62);
  background:
    linear-gradient(135deg, rgba(32, 90, 70, 0.96), rgba(45, 106, 79, 0.88) 44%, rgba(147, 112, 63, 0.82)),
    url("/img/12.jpg") center 46% / cover;
}

.dashboard-heading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(17, 31, 28, 0.18), transparent 52%),
    linear-gradient(0deg, rgba(17, 31, 28, 0.1), rgba(255, 255, 255, 0.06));
}

.dashboard-heading .eyebrow,
.dashboard-heading h2,
.dashboard-heading-copy {
  color: #fff;
}

.dashboard-heading .eyebrow {
  opacity: 0.78;
}

.dashboard-heading h2 {
  margin: 3px 0 8px;
  font-size: 31px;
  letter-spacing: 0;
}

.dashboard-heading-copy {
  max-width: 520px;
  opacity: 0.82;
}

.dashboard-heading-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.dashboard-heading-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.dashboard-heading-meta span:last-child::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #86efac;
  box-shadow: 0 0 0 4px rgba(134, 239, 172, 0.16), 0 0 12px rgba(134, 239, 172, 0.46);
}

.dashboard-actions .ghost-button {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 14px 34px rgba(10, 26, 21, 0.14);
  backdrop-filter: blur(10px);
}

.dashboard-actions .ghost-button:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.2);
}

.admin-dashboard > .dashboard-grid {
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 14px;
  padding: 22px 24px 0;
}

.admin-dashboard .stat-card {
  min-height: 138px;
  padding: 16px;
  border-color: rgba(42, 67, 57, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 252, 249, 0.82)),
    linear-gradient(135deg, var(--stat-soft), transparent 60%);
  box-shadow: 0 14px 30px rgba(27, 45, 37, 0.07);
}

.admin-dashboard .stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 3px solid var(--stat-color, var(--leaf));
  opacity: 0.76;
}

.admin-dashboard .stat-card::after {
  right: -22px;
  bottom: -28px;
  width: 74px;
  height: 74px;
  filter: blur(0.2px);
}

.stat-card-top {
  color: #5b6964;
  font-size: 13px;
}

.stat-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.admin-dashboard .stat-card strong {
  margin-top: 5px;
  color: #1f302b;
  font-size: 34px;
}

.admin-dashboard .stat-card small {
  color: #6c7a75;
}

.dashboard-content-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 18px;
  padding: 20px 24px 24px;
}

.dashboard-section {
  padding: 18px;
  border-color: rgba(42, 67, 57, 0.1);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 32px rgba(27, 45, 37, 0.065);
}

.dashboard-section-heading {
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom-color: rgba(42, 67, 57, 0.1);
}

.dashboard-section-heading h3 {
  color: #263b34;
  font-size: 19px;
}

.dashboard-section-heading > span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #68756f;
  background: rgba(45, 106, 79, 0.07);
}

.dashboard-feed-row,
.admin-dashboard .popular-list a,
.dashboard-comment-row {
  border-bottom-color: rgba(42, 67, 57, 0.1);
}

.dashboard-feed-row {
  padding: 13px 8px;
  border-radius: 7px;
}

.dashboard-feed-row:hover {
  padding-left: 12px;
  background: rgba(45, 106, 79, 0.055);
}

.dashboard-feed-row b {
  padding: 5px 8px;
  border-radius: 8px;
  color: #8b5b2d;
  background: rgba(210, 173, 96, 0.12);
}

.admin-dashboard .popular-list a {
  padding: 12px 8px;
  border-radius: 7px;
}

.admin-dashboard .popular-list a:hover {
  background: rgba(45, 106, 79, 0.055);
}

.admin-dashboard .popular-list strong {
  border-radius: 8px;
}

.admin-dashboard .chart-row {
  grid-template-columns: minmax(72px, 0.72fr) minmax(110px, 2fr) auto;
  padding: 5px 0;
}

.admin-dashboard .chart-row div {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
}

.admin-dashboard .chart-row i {
  border-radius: inherit;
  box-shadow: 0 0 14px rgba(76, 151, 119, 0.18);
}

.dashboard-comment-row {
  padding: 12px 8px;
  border-radius: 7px;
}

.dashboard-comment-row:hover {
  background: rgba(45, 106, 79, 0.055);
}

.dashboard-comment-avatar {
  background: linear-gradient(135deg, #3d8b6a, #7d9451);
  box-shadow: 0 8px 16px rgba(45, 106, 79, 0.16);
}

.dashboard-login-list {
  display: grid;
  gap: 8px;
}

.login-event-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(42, 67, 57, 0.1);
  border-radius: 8px;
  background: rgba(45, 106, 79, 0.045);
}

.login-event-row > span {
  display: inline-flex;
  justify-content: center;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: #3d8b6a;
  font-size: 12px;
}

.login-event-row.failed > span {
  background: #bd5b5b;
}

.login-event-row strong,
.login-event-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-event-row small {
  color: var(--muted);
  font-size: 12px;
}

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

.health-card {
  position: relative;
  min-height: 132px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(42, 67, 57, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 30px rgba(27, 45, 37, 0.065);
}

.health-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -32px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(45, 106, 79, 0.08);
}

.health-card.warn::after {
  background: rgba(189, 106, 74, 0.11);
}

.health-card > span {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #2d6a4f;
  background: rgba(45, 106, 79, 0.1);
  font-size: 12px;
  font-weight: 700;
}

.health-card.warn > span {
  color: #9a533e;
  background: rgba(189, 106, 74, 0.12);
}

.health-card strong {
  display: block;
  color: #263b34;
  font-size: 20px;
}

.health-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.admin-dashboard > #backupStatus {
  margin: -12px 24px 20px;
}

@media (max-width: 1320px) {
  .admin-dashboard > .dashboard-grid {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }
}

@media (max-width: 620px) {
  .dashboard-heading {
    min-height: 0;
    padding: 22px 18px;
  }

  .dashboard-heading h2 {
    font-size: 26px;
  }

  .dashboard-heading-meta span {
    min-height: 26px;
  }
}

/* High quality article metadata icons */
.public-page .meta-icon,
.detail-public .meta-icon {
  width: 17px;
  height: 17px;
  border: 0;
  border-radius: 0;
  background: center / contain no-repeat;
}

.public-page .meta-icon::before,
.public-page .meta-icon::after,
.detail-public .meta-icon::before,
.detail-public .meta-icon::after {
  content: none;
}

.public-page .calendar-icon,
.detail-public .calendar-icon {
  background-image: url("/img/high_quality_blog_icon_set/svg/calendar.svg");
}

.public-page .comment-icon,
.detail-public .comment-icon {
  background-image: url("/img/high_quality_blog_icon_set/svg/comment.svg");
}

.public-page .eye-icon,
.detail-public .eye-icon {
  width: 18px;
  height: 18px;
  margin-top: 0;
  background-image: url("/img/high_quality_blog_icon_set/svg/eye.svg");
}

.public-page .like-icon,
.detail-public .like-icon {
  background-image: url("/img/high_quality_blog_icon_set/svg/heart.svg");
}

.public-page .user-icon,
.detail-public .user-icon {
  background-image: url("/img/high_quality_blog_icon_set/svg/user.svg");
}

.public-page .star-icon,
.detail-public .star-icon {
  background-image: url("/img/high_quality_blog_icon_set/svg/bookmark.svg");
}

.public-page .arrow-icon,
.detail-public .arrow-icon {
  width: 17px;
  height: 17px;
  background-image: url("/img/high_quality_blog_icon_set/svg/external-link.svg");
}

.public-page .front-post-content .post-meta .read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.public-page #articleCategories,
.public-page #articleTags,
.public-page #articleArchives,
.public-page #articlePopular {
  scroll-margin-top: 88px;
}

/* Homepage primary navigation */
.public-page .site-nav-primary {
  display: flex;
  align-self: stretch;
  align-items: stretch;
  margin-right: auto;
  margin-left: 0;
}

.public-page .site-nav-links {
  display: none;
}

.public-page .site-nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
  min-height: 60px;
  padding: 0 14px;
  color: #606266;
  border-bottom: 0;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.public-page .nav-item-icon,
.detail-public .nav-item-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(39%) sepia(12%) saturate(668%) hue-rotate(151deg) brightness(93%) contrast(88%);
  opacity: 0.9;
}

.public-page .site-nav-item::after,
.anime-topbar .detail-nav-items a::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 0;
  left: 8px;
  height: 3px;
  border-radius: 6px 6px 0 0;
  background: var(--moe-blue);
  opacity: 0;
  transform: scaleX(0.25);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.public-page .site-nav-item:hover,
.public-page .site-nav-item.active {
  color: var(--moe-blue);
  background: transparent;
}

.public-page .site-nav-item:hover::after,
.public-page .site-nav-item.active::after,
.anime-topbar .detail-nav-items a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

@media (max-width: 700px) {
  .public-page .site-hero {
    padding-top: 100px;
  }

  .public-page .site-nav {
    flex-wrap: wrap;
  }

  .public-page .site-nav-links {
    width: auto;
    margin-left: auto;
  }

  .public-page .site-nav-primary {
    order: 3;
    width: 100%;
    margin: 0;
    overflow-x: auto;
    border-top: 1px solid rgba(226, 232, 240, 0.78);
  }

  .public-page .site-nav-item {
    flex: 1;
    min-height: 38px;
    padding: 0 10px;
    font-size: 14px;
  }

}

/* Keep homepage article covers visually consistent. */
.public-page .front-post-card,
.public-page .front-post-card:first-child,
body[data-template="compact"].public-page .front-post-card:first-child,
body[data-template="magazine"].public-page .front-post-card:first-child {
  height: 286px;
  min-height: 286px;
}

.public-page .front-cover,
.public-page .front-post-card:first-child .front-cover,
body[data-template="compact"].public-page .front-post-card:first-child .front-cover,
body[data-template="magazine"].public-page .front-post-card:first-child .front-cover {
  height: 100%;
  min-height: 0;
}

.public-page .front-post-content {
  overflow: hidden;
}

.public-page .front-post-content p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

@media (max-width: 700px) {
  .public-page .front-post-card,
  .public-page .front-post-card:first-child,
  body[data-template="compact"].public-page .front-post-card:first-child,
  body[data-template="magazine"].public-page .front-post-card:first-child {
    height: auto;
    min-height: 0;
  }

  .public-page .front-cover,
  .public-page .front-post-card:first-child .front-cover,
  body[data-template="compact"].public-page .front-post-card:first-child .front-cover,
  body[data-template="magazine"].public-page .front-post-card:first-child .front-cover {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
  }

  .public-page .front-post-content p {
    -webkit-line-clamp: 3;
  }
}

/* Article like interaction */
.detail-public .article-copyright-panel {
  display: grid;
  gap: 8px;
  margin: 28px 0 24px;
  padding: 18px 22px;
  color: #6f604f;
  border: 1px solid rgba(215, 174, 112, 0.5);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.78);
  box-shadow: 0 12px 28px rgba(129, 99, 59, 0.08);
}

.detail-public .article-copyright-panel p {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  line-height: 1.7;
}

.detail-public .article-copyright-panel strong {
  color: #8f5a22;
  font-weight: 700;
}

.detail-public .article-copyright-panel a,
.detail-public .article-copyright-panel span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-public .article-copyright-panel a {
  color: #9a5b18;
  text-decoration: none;
}

.detail-public .article-copyright-panel a:hover {
  text-decoration: underline;
}

.detail-public .article-like-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  margin: 34px 0 4px;
  padding: 20px 22px;
  overflow: hidden;
  border: 1px solid rgba(244, 143, 177, 0.24);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 205, 224, 0.44), transparent 42%),
    linear-gradient(135deg, rgba(255, 252, 254, 0.96), rgba(248, 253, 255, 0.92));
  box-shadow: 0 10px 26px rgba(97, 143, 172, 0.1);
}

.detail-public .article-like-panel::before {
  content: "";
  position: absolute;
  width: 88px;
  height: 88px;
  right: -34px;
  bottom: -42px;
  border: 12px solid rgba(100, 190, 239, 0.1);
  border-radius: 50%;
}

.detail-public .article-like-copy {
  display: grid;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.detail-public .article-like-copy span {
  color: #f082ab;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.detail-public .article-like-copy strong {
  color: #45536a;
  font-size: 17px;
  letter-spacing: 0.04em;
}

.detail-public .article-like-copy small {
  color: #97a0ae;
  font-size: 12px;
}

.detail-public .article-like-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  min-width: 132px;
  min-height: 48px;
  padding: 0 16px;
  color: #ed739e;
  border: 1px solid rgba(241, 124, 165, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 14px rgba(234, 112, 155, 0.13);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.detail-public .article-like-button:hover {
  border-color: rgba(241, 124, 165, 0.72);
  box-shadow: 0 8px 20px rgba(234, 112, 155, 0.2);
  transform: translateY(-2px);
}

.detail-public .article-like-button:focus-visible {
  outline: 3px solid rgba(89, 179, 234, 0.3);
  outline-offset: 3px;
}

.detail-public .article-like-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.detail-public .article-like-button.is-liked {
  color: #fff;
  border-color: #f17fa8;
  background: linear-gradient(135deg, #f58caf, #ee709d);
  box-shadow: 0 9px 22px rgba(235, 103, 151, 0.28);
}

.detail-public .article-like-icon {
  display: inline-flex;
  width: 21px;
  height: 21px;
}

.detail-public .article-like-icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: rgba(241, 124, 165, 0.14);
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: fill 180ms ease, transform 180ms ease;
}

.detail-public .article-like-button.is-liked .article-like-icon svg {
  fill: currentColor;
}

.detail-public .article-like-count {
  min-width: 22px;
  padding-left: 7px;
  border-left: 1px solid currentColor;
  font-variant-numeric: tabular-nums;
  opacity: 0.82;
}

.detail-public .article-like-button.is-celebrating .article-like-icon svg {
  animation: article-like-pop 560ms ease;
}

.detail-public .article-like-particles {
  position: absolute;
  right: 64px;
  top: 48%;
  z-index: 3;
  pointer-events: none;
}

.detail-public .article-like-particles span {
  position: absolute;
  color: #f17fa8;
  font-size: 14px;
  opacity: 0;
  animation: article-like-float 820ms var(--like-delay) ease-out forwards;
}

@keyframes article-like-pop {
  0%, 100% { transform: scale(1); }
  38% { transform: scale(1.44) rotate(-9deg); }
  68% { transform: scale(0.9) rotate(5deg); }
}

@keyframes article-like-float {
  0% { opacity: 0; transform: translate(0, 0) scale(0.5) rotate(0); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--like-x), -68px) scale(1.18) rotate(18deg); }
}

@media (max-width: 560px) {
  .detail-public .article-copyright-panel {
    padding: 15px 16px;
  }

  .detail-public .article-copyright-panel p {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .detail-public .article-like-panel {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
  }

  .detail-public .article-like-button {
    width: 100%;
  }

  .detail-public .article-like-particles {
    right: 50%;
    top: auto;
    bottom: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .detail-public .article-like-button,
  .detail-public .article-like-icon svg {
    transition: none;
  }

  .detail-public .article-like-button.is-celebrating .article-like-icon svg,
  .detail-public .article-like-particles span {
    animation: none;
  }
}

/* Refined sunset wordmark */
.public-page .brand-lockup,
.detail-public .brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.public-page .brand-wordmark,
.detail-public .brand-wordmark {
  display: inline-flex;
  position: relative;
  align-items: center;
  padding: 3px 0 5px;
}

.public-page .brand-wordmark::before,
.detail-public .brand-wordmark::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 200, 118, 0.88), rgba(232, 117, 101, 0.88));
  box-shadow: 0 0 12px rgba(236, 145, 104, 0.24);
  opacity: 0.62;
  transform: translate(-50%, -18%);
  transition: opacity 240ms ease, transform 300ms ease;
}

.public-page .brand-wordmark::after,
.detail-public .brand-wordmark::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(219, 111, 94, 0), rgba(219, 111, 94, 0.78) 20%, rgba(74, 124, 145, 0.62) 72%, rgba(74, 124, 145, 0));
  transform: scaleX(0.94);
  transform-origin: center;
  transition: opacity 240ms ease, transform 300ms ease;
}

.public-page .brand-title,
.detail-public .brand-title {
  position: relative;
  z-index: 1;
  color: transparent;
  background: linear-gradient(110deg, #243946 0%, #315364 72%, #a75b57 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-family: "Noto Serif SC", "ZCOOL XiaoWei", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1;
  text-shadow: none;
  transition: letter-spacing 300ms ease, filter 240ms ease;
}

.public-page .brand-seal,
.detail-public .brand-seal {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  padding-left: 1px;
  color: rgba(201, 84, 76, 0.84);
  border: 1px solid rgba(201, 84, 76, 0.7);
  border-radius: 3px;
  background: rgba(255, 249, 244, 0.4);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56);
  font-family: "Noto Serif SC", serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.05;
  writing-mode: vertical-rl;
  transition: background 240ms ease, box-shadow 240ms ease, color 240ms ease, transform 300ms ease;
}

.public-page .brand-lockup:hover .brand-wordmark::before,
.detail-public .brand-lockup:hover .brand-wordmark::before {
  opacity: 0.9;
  transform: translate(-50%, -26%) scale(1.08);
}

.public-page .brand-lockup:hover .brand-wordmark::after,
.detail-public .brand-lockup:hover .brand-wordmark::after {
  transform: scaleX(1);
}

.public-page .brand-lockup:hover .brand-title,
.detail-public .brand-lockup:hover .brand-title {
  letter-spacing: 0.145em;
  filter: saturate(1.2);
}

.public-page .brand-lockup:hover .brand-seal,
.detail-public .brand-lockup:hover .brand-seal {
  color: #fff;
  background: rgba(201, 84, 76, 0.88);
  box-shadow: 0 3px 8px rgba(185, 78, 72, 0.2);
  transform: rotate(-4deg);
}

@media (max-width: 700px) {
  .public-page .brand-lockup,
  .detail-public .brand-lockup {
    gap: 6px;
  }

  .public-page .brand-title,
  .detail-public .brand-title {
    font-size: 16px;
    letter-spacing: 0.09em;
  }

  .public-page .brand-wordmark::before,
  .detail-public .brand-wordmark::before {
    width: 14px;
    height: 14px;
  }

  .public-page .brand-seal,
  .detail-public .brand-seal {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
    font-size: 7px;
  }
}

/* Public visual refinement: calm sunset theme */
.public-page .site-nav,
.detail-public .anime-topbar {
  background: rgba(247, 250, 252, 0.76);
  border-bottom-color: rgba(218, 228, 234, 0.76);
  box-shadow: 0 3px 18px rgba(35, 62, 76, 0.1);
  -webkit-backdrop-filter: blur(15px) saturate(1.14);
  backdrop-filter: blur(15px) saturate(1.14);
}

.public-page .site-nav-item,
.detail-public .anime-topbar a {
  color: #596b75;
  transition: color 180ms ease, background-color 180ms ease;
}

.public-page .site-nav-item:hover,
.public-page .site-nav-item.active,
.detail-public .anime-topbar a:hover {
  color: #c56c66;
  background: rgba(221, 124, 113, 0.055);
}

.public-page .site-nav-item::after,
.detail-public .anime-topbar .detail-nav-items a::after {
  height: 2px;
  background: linear-gradient(90deg, #e89783, #d46f77);
}

.public-page .site-hero-content h1 {
  color: transparent;
  background: linear-gradient(105deg, #fffaf4 0%, #ffe6db 30%, #f7c4bb 52%, #f3d9cd 68%, #fffaf4 100%);
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow:
    0 2px 7px rgba(56, 67, 77, 0.2),
    0 0 16px rgba(247, 190, 181, 0.22);
  animation: heroTitleShine 9s ease-in-out infinite;
}

.public-page .hero-typed-line {
  color: rgba(255, 249, 244, 0.92);
  text-shadow: 0 2px 8px rgba(28, 50, 66, 0.34);
}

.public-page .site-main {
  gap: 22px;
}

.public-page .profile-card,
.detail-public .profile-card,
.public-page .anime-widget,
.detail-public .anime-widget {
  border-color: rgba(201, 216, 224, 0.66);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 24px rgba(46, 82, 99, 0.09);
}

.public-page .profile-card,
.detail-public .profile-card {
  overflow: hidden;
}

.public-page .front-post-list {
  gap: 20px;
}

.public-page .front-post-card,
.public-page .front-post-card:first-child,
body[data-template="compact"].public-page .front-post-card:first-child,
body[data-template="magazine"].public-page .front-post-card:first-child {
  overflow: hidden;
  border: 1px solid rgba(201, 216, 224, 0.68);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(43, 76, 94, 0.09);
  transition: border-color 220ms ease, box-shadow 260ms ease, transform 260ms ease;
}

.public-page .front-post-card:hover {
  border-color: rgba(221, 141, 130, 0.66);
  box-shadow: 0 15px 34px rgba(43, 76, 94, 0.16);
  transform: translateY(-4px);
}

.public-page .front-cover {
  transition: transform 520ms ease, filter 320ms ease;
}

.public-page .front-post-card:hover .front-cover {
  filter: saturate(1.06) contrast(1.02);
  transform: scale(1.035);
}

.public-page .front-post-content {
  padding: 21px 22px;
}

.public-page .front-post-content h3,
.public-page .front-post-card:first-child h3 {
  margin-bottom: 10px;
  color: #334a56;
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.public-page .front-post-content p {
  color: #71808a;
  line-height: 1.78;
}

.public-page .front-post-content .post-meta {
  color: #8c9aa2;
}

.public-page .post-tags span {
  color: #b65f62;
  border-color: rgba(209, 113, 111, 0.2);
  background: rgba(246, 220, 213, 0.42);
}

.public-page .site-filter {
  gap: 14px;
}

.public-page .anime-widget h3,
.detail-public .anime-widget h3 {
  color: #405964;
  font-family: "Noto Serif SC", serif;
  letter-spacing: 0.04em;
}

.public-page .public-footer,
.detail-public .public-footer {
  border-top-color: rgba(205, 219, 226, 0.8);
  background: rgba(250, 252, 252, 0.84);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

@media (max-width: 700px) {
  .public-page .site-nav {
    background: rgba(247, 250, 252, 0.82);
  }

  .public-page .site-nav-primary {
    border-top-color: rgba(211, 224, 230, 0.74);
  }

  .public-page .front-post-list {
    gap: 16px;
  }

  .public-page .front-post-card,
  .public-page .front-post-card:first-child,
  body[data-template="compact"].public-page .front-post-card:first-child,
  body[data-template="magazine"].public-page .front-post-card:first-child {
    border-radius: 11px;
  }

  .public-page .front-post-content {
    padding: 17px 18px;
  }
}

/* Reading experience and comments refinement */
.detail-public .anime-article-card {
  border-color: rgba(202, 216, 224, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 12px 32px rgba(42, 76, 94, 0.1);
}

.detail-public .anime-article-card h1 {
  color: #314954;
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.detail-public .anime-article-card .article-summary {
  margin: 4px 0 24px;
  padding: 14px 16px;
  color: #667983;
  border-left: 3px solid #d98079;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, rgba(249, 233, 226, 0.7), rgba(246, 250, 251, 0.76));
  font-size: 15px;
  line-height: 1.9;
}

.detail-public .anime-article-card .article-content {
  color: #4b5d65;
  font-size: 16px;
  line-height: 2.06;
  letter-spacing: 0.018em;
  overflow-wrap: anywhere;
}

.detail-public .anime-article-card .article-content p,
.detail-public .anime-article-card .article-content ul,
.detail-public .anime-article-card .article-content ol,
.detail-public .anime-article-card .article-content blockquote {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.detail-public .anime-article-card .article-content p {
  margin: 0 0 1.35em;
}

.detail-public .anime-article-card .article-content ul,
.detail-public .anime-article-card .article-content ol {
  margin: 0 0 1.35em;
  padding-left: 1.65em;
}

.detail-public .anime-article-card .article-content li + li {
  margin-top: 0.36em;
}

.detail-public .anime-article-card .article-content h2,
.detail-public .anime-article-card .article-content h3 {
  margin-top: 30px;
  margin-bottom: 18px;
  color: #3d5661;
  border-left-color: #d98079;
  background: linear-gradient(90deg, rgba(247, 233, 228, 0.82), rgba(247, 250, 251, 0.56));
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.detail-public .anime-article-card .article-content a {
  color: #b86565;
  text-decoration-color: rgba(184, 101, 101, 0.34);
  text-underline-offset: 4px;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.detail-public .anime-article-card .article-content a:hover {
  color: #d16f70;
  text-decoration-color: currentColor;
}

.detail-public .anime-article-card .article-content blockquote {
  margin: 22px 0;
  padding: 14px 18px;
  color: #6d7c83;
  border-left: 3px solid rgba(209, 128, 119, 0.78);
  border-radius: 0 9px 9px 0;
  background: rgba(248, 241, 236, 0.78);
}

.detail-public .anime-article-card .article-content blockquote p:last-child {
  margin-bottom: 0;
}

.detail-public .anime-article-card .article-content code {
  padding: 2px 6px;
  color: #a9555c;
  border-radius: 5px;
  background: rgba(244, 225, 220, 0.66);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9em;
}

.detail-public .anime-article-card .article-content pre {
  margin: 22px 0;
  padding: 17px 19px;
  overflow-x: auto;
  color: #d7e5ea;
  border-radius: 10px;
  background: #263941;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  line-height: 1.72;
}

.detail-public .anime-article-card .article-content pre code {
  padding: 0;
  color: inherit;
  background: transparent;
}

.detail-public .anime-article-card .article-content img {
  margin: 22px auto;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(41, 70, 83, 0.14);
}

.detail-public .article-toc {
  border-color: rgba(202, 216, 224, 0.82);
  border-radius: 10px;
  background: rgba(247, 250, 251, 0.86);
}

.detail-public .anime-comments-card {
  border-color: rgba(202, 216, 224, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 32px rgba(42, 76, 94, 0.09);
}

.detail-public .anime-comments-card .comment-section-heading h2 {
  color: #405864;
  font-family: "Noto Serif SC", serif;
  letter-spacing: 0.06em;
}

.detail-public .comment-identity-row,
.detail-public .anime-comments-card textarea#commentContent {
  overflow: hidden;
  border: 1px solid rgba(201, 216, 224, 0.86);
  border-radius: 9px;
  background: rgba(249, 252, 252, 0.86);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.detail-public .comment-identity-row:focus-within,
.detail-public .anime-comments-card textarea#commentContent:focus {
  border-color: rgba(209, 128, 119, 0.68);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(216, 132, 122, 0.1);
}

.detail-public .anime-comments-card input,
.detail-public .anime-comments-card textarea {
  color: #4b5d65;
}

.detail-public .anime-comments-card textarea#commentContent {
  margin: 12px 12px 0;
  padding: 14px 15px;
}

.detail-public .anime-comments-card .comment-form-footer .save-button {
  border-radius: 999px;
  background: linear-gradient(135deg, #d78279, #c96c70);
  box-shadow: 0 6px 14px rgba(199, 105, 107, 0.18);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.detail-public .anime-comments-card .comment-form-footer .save-button:hover {
  box-shadow: 0 9px 20px rgba(199, 105, 107, 0.26);
  transform: translateY(-1px);
}

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

.detail-public .comment-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(211, 222, 227, 0.76);
  border-radius: 10px;
  background: rgba(252, 253, 253, 0.9);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.detail-public .comment-thread-replies {
  display: grid;
  gap: 12px;
  margin: -4px 0 4px 54px;
}

.detail-public .comment-card.is-reply {
  grid-template-columns: 36px minmax(0, 1fr);
  padding: 12px 13px;
  border-color: rgba(211, 222, 227, 0.54);
  background: rgba(247, 249, 249, 0.82);
}

.detail-public .comment-card:hover {
  border-color: rgba(221, 154, 143, 0.72);
  box-shadow: 0 7px 18px rgba(57, 87, 100, 0.08);
  transform: translateY(-1px);
}

.detail-public .comment-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #e6a28f, #cc7477);
  box-shadow: 0 4px 10px rgba(197, 107, 105, 0.18);
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
}

.detail-public .comment-avatar.has-image {
  overflow: hidden;
  background: #fff;
}

.detail-public .comment-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-public .comment-card.is-reply .comment-avatar {
  width: 36px;
  height: 36px;
  font-size: 13px;
}

.detail-public .comment-card-body {
  min-width: 0;
}

.detail-public .comment-card-header,
.detail-public .comment-author-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-public .comment-card-header {
  justify-content: space-between;
}

.detail-public .comment-card-header strong {
  color: #405864;
}

.detail-public .comment-card-header span,
.detail-public .comment-card-header small {
  color: #a1adb1;
  font-size: 12px;
}

.detail-public .comment-card-body > p {
  margin: 8px 0 0;
  color: #60717a;
  line-height: 1.75;
}

.detail-public .comment-reply-to {
  margin-top: 10px;
  color: #7e8b91;
  font-size: 13px;
  font-weight: 600;
}

.detail-public .comment-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 9px;
}

.detail-public .comment-visitor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.detail-public .comment-visitor-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  color: #84939a;
  border: 1px solid rgba(201, 216, 224, 0.72);
  border-radius: 999px;
  background: rgba(249, 252, 252, 0.78);
  font-size: 12px;
  line-height: 1;
}

.detail-public .comment-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.detail-public .comment-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  color: #2f9bff;
  border: 0;
  border-radius: 6px;
  background: transparent;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.detail-public .comment-actions button:hover,
.detail-public .comment-actions button.is-active {
  color: #0d7ee7;
  background: rgba(47, 155, 255, 0.1);
  transform: translateY(-1px);
}

.detail-public .comment-actions svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-public .comment-action-count {
  order: 2;
  min-width: 0;
  height: auto;
  padding: 0;
  color: currentColor;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

.detail-public .comment-reply {
  margin-top: 11px;
  padding: 10px 12px;
  border-left: 3px solid rgba(208, 126, 119, 0.68);
  border-radius: 0 7px 7px 0;
  background: rgba(248, 237, 231, 0.62);
}

@media (max-width: 700px) {
  .public-page .site-nav {
    min-height: auto;
  }

  .public-page .site-logo {
    min-height: 46px;
  }

  .public-page .site-nav-primary {
    min-height: 36px;
    scrollbar-width: none;
  }

  .public-page .site-nav-primary::-webkit-scrollbar {
    display: none;
  }

  .public-page .site-nav-item {
    min-height: 36px;
    padding: 0 13px;
    font-size: 13px;
  }

  .public-page .site-hero {
    padding-top: 82px;
  }

  .detail-public .anime-article-card .article-content {
    font-size: 15px;
    line-height: 1.96;
  }

  .detail-public .anime-article-card .article-content h2,
  .detail-public .anime-article-card .article-content h3 {
    margin-top: 24px;
    margin-bottom: 14px;
  }

  .detail-public .comment-card {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .detail-public .comment-avatar {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
}

/* Sidebar, footer, about page and empty-state refinement */
.public-page .anime-widget,
.detail-public .anime-widget {
  position: relative;
  overflow: hidden;
  padding: 16px;
}

.public-page .anime-widget::before,
.detail-public .anime-widget::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  width: 42px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #db8078, #e8aa91);
}

.public-page .anime-widget h3,
.detail-public .anime-widget h3 {
  margin: 0 0 13px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(208, 220, 226, 0.78);
  font-size: 17px;
}

.public-page .side-list,
.detail-public .side-list {
  display: grid;
  gap: 0;
}

.public-page .side-list a,
.detail-public .side-list a {
  display: grid;
  gap: 3px;
  position: relative;
  padding: 10px 8px 10px 13px;
  color: #5f737c;
  border-bottom: 1px dashed rgba(205, 218, 224, 0.82);
  border-radius: 7px;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, padding-left 180ms ease;
}

.public-page .side-list a:last-child,
.detail-public .side-list a:last-child {
  border-bottom-color: transparent;
}

.public-page .side-list a::before,
.detail-public .side-list a::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e39b86, #ca6c70);
  box-shadow: 0 0 0 3px rgba(218, 125, 119, 0.1);
  transition: transform 180ms ease;
}

.public-page .side-list a:hover,
.detail-public .side-list a:hover {
  padding-left: 16px;
  color: #b86664;
  background: linear-gradient(90deg, rgba(247, 232, 226, 0.72), rgba(249, 252, 252, 0.28));
}

.public-page .side-list a:hover::before,
.detail-public .side-list a:hover::before {
  transform: scale(1.28);
}

.public-page .side-list strong,
.detail-public .side-list strong {
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-page .side-list span,
.detail-public .side-list span,
.public-page .muted-line,
.detail-public .muted-line {
  color: #9ca9ad;
  font-size: 12px;
  line-height: 1.55;
}

.public-page .profile-stats,
.detail-public .profile-stats {
  border-top-color: rgba(209, 220, 225, 0.74);
  border-bottom-color: rgba(209, 220, 225, 0.74);
}

.public-page .profile-stats strong,
.detail-public .profile-stats strong {
  color: #3e5964;
  font-family: "Noto Serif SC", serif;
}

.public-page .profile-social,
.detail-public .profile-social {
  border-color: rgba(202, 215, 221, 0.82);
  background: rgba(255, 255, 255, 0.8);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.public-page .profile-social:hover,
.detail-public .profile-social:hover {
  border-color: rgba(218, 132, 123, 0.56);
  box-shadow: 0 5px 13px rgba(67, 96, 108, 0.1);
  transform: translateY(-2px);
}

.public-page .empty-state,
.detail-public .empty-state,
.about-public .empty-state {
  position: relative;
  padding: 34px 22px;
  color: #89979d;
  border: 1px dashed rgba(198, 214, 221, 0.9);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 0, rgba(244, 218, 207, 0.5), transparent 42%),
    rgba(250, 252, 252, 0.72);
  text-align: center;
}

.public-page .empty-state::before,
.detail-public .empty-state::before,
.about-public .empty-state::before {
  content: "◇";
  display: block;
  margin-bottom: 7px;
  color: #d4867d;
  font-size: 22px;
  line-height: 1;
}

.public-page .public-footer,
.detail-public .public-footer,
.about-public .public-footer {
  position: relative;
  overflow: hidden;
  padding-top: 24px;
  padding-bottom: 24px;
  color: #819097;
}

.public-page .public-footer::before,
.detail-public .public-footer::before,
.about-public .public-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(340px, 62vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(210, 119, 114, 0.7), rgba(92, 140, 155, 0.55), transparent);
  transform: translateX(-50%);
}

.public-page .public-footer strong,
.detail-public .public-footer strong,
.about-public .public-footer strong {
  color: #49636e;
  font-family: "Noto Serif SC", serif;
  letter-spacing: 0.08em;
}

.public-page .public-footer span,
.detail-public .public-footer span,
.about-public .public-footer span {
  color: #8f9da2;
}

.about-public .detail-page {
  width: min(900px, calc(100% - 28px));
  margin-top: 34px;
  margin-bottom: 56px;
}

.about-public .about-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(201, 216, 224, 0.76);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 14px 36px rgba(42, 76, 94, 0.11);
}

.about-public .about-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #e89b84, #d67673 42%, #6b9eb0);
}

.about-public .about-card h1 {
  color: #39535e;
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.about-public .article-content {
  color: #5e7078;
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.018em;
}

.about-public .article-content h2,
.about-public .article-content h3 {
  color: #405a64;
  font-family: "Noto Serif SC", serif;
}

.about-public .article-content a {
  color: #b96665;
  text-underline-offset: 4px;
}

@media (max-width: 700px) {
  .public-page .anime-widget,
  .detail-public .anime-widget {
    padding: 14px;
  }

  .public-page .anime-widget::before,
  .detail-public .anime-widget::before {
    left: 14px;
  }

  .public-page .public-footer,
  .detail-public .public-footer,
  .about-public .public-footer {
    padding: 20px 16px;
  }

  .about-public .detail-page {
    margin-top: 18px;
    margin-bottom: 34px;
  }
}

/* Reading progress, image lightbox, gallery and tutorials */
.reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 300;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.reading-progress.is-active {
  opacity: 1;
}

.reading-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #efaf8e, #d86f75 48%, #6ba6ba);
  box-shadow: 0 0 10px rgba(214, 110, 112, 0.46);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 100ms linear;
}

.detail-public .article-content img,
.gallery-grid img,
.gallery-card img,
.gallery-page img {
  cursor: zoom-in;
}

.article-lightbox,
.gallery-lightbox {
  display: grid;
  position: fixed;
  inset: 0;
  z-index: 500;
  place-items: center;
  padding: 56px 24px 24px;
  visibility: hidden;
  background: rgba(14, 29, 37, 0.86);
  opacity: 0;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: opacity 220ms ease, visibility 220ms ease;
}

.article-lightbox.is-open,
.gallery-lightbox.is-open {
  visibility: visible;
  opacity: 1;
}

.article-lightbox figure,
.gallery-lightbox figure {
  display: grid;
  gap: 11px;
  max-width: min(1180px, 94vw);
  max-height: 88vh;
  margin: 0;
  text-align: center;
}

.article-lightbox img,
.gallery-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  margin: auto;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.38);
  object-fit: contain;
  transform: translateY(10px) scale(0.985);
  transition: transform 240ms ease;
}

.article-lightbox.is-open img,
.gallery-lightbox.is-open img {
  transform: translateY(0) scale(1);
}

.article-lightbox figcaption,
.gallery-lightbox figcaption {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  line-height: 1.6;
}

.article-lightbox-close,
.gallery-lightbox-close {
  display: grid;
  position: absolute;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 29px;
  font-weight: 300;
  line-height: 1;
  transition: background 180ms ease, transform 180ms ease;
}

.article-lightbox-close:hover,
.gallery-lightbox-close:hover {
  background: rgba(218, 112, 112, 0.78);
  transform: rotate(90deg);
}

.gallery-lightbox-toolbar {
  display: flex;
  position: absolute;
  top: 18px;
  left: 22px;
  gap: 12px;
  align-items: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.gallery-lightbox-count {
  min-width: 52px;
  font-variant-numeric: tabular-nums;
}

.gallery-lightbox-source {
  padding: 5px 11px;
  color: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease;
}

.gallery-lightbox-source:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.16);
}

.gallery-lightbox-nav {
  display: grid;
  position: absolute;
  top: 50%;
  width: 48px;
  height: 72px;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 42px;
  font-weight: 200;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.gallery-lightbox-prev {
  left: 18px;
}

.gallery-lightbox-next {
  right: 18px;
}

.gallery-lightbox-nav:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-50%) scale(1.04);
}

body.lightbox-open {
  overflow: hidden;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  align-items: start;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(201, 216, 224, 0.76);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 22px rgba(42, 76, 94, 0.09);
  transition: border-color 220ms ease, box-shadow 260ms ease, transform 260ms ease;
}

.gallery-card:hover,
.gallery-item:hover {
  border-color: rgba(219, 139, 129, 0.7);
  box-shadow: 0 15px 32px rgba(42, 76, 94, 0.16);
  transform: translateY(-4px);
}

.gallery-card img,
.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: filter 260ms ease, transform 520ms ease;
}

.gallery-card:hover img,
.gallery-item:hover img {
  filter: saturate(1.08) contrast(1.03);
  transform: scale(1.04);
}

.gallery-card figcaption,
.gallery-card p,
.gallery-card span,
.gallery-item figcaption,
.gallery-item p,
.gallery-item span {
  color: #7d8d94;
}

.gallery-card small {
  display: block;
  margin: -4px 12px 12px;
  color: rgba(109, 116, 110, 0.86);
  font-size: 12px;
  text-align: center;
}

.tutorial-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

.tutorial-card {
  overflow: hidden;
  border: 1px solid rgba(201, 216, 224, 0.76);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(42, 76, 94, 0.09);
  transition: border-color 220ms ease, box-shadow 260ms ease, transform 260ms ease;
}

.tutorial-card:hover {
  border-color: rgba(219, 139, 129, 0.7);
  box-shadow: 0 15px 34px rgba(42, 76, 94, 0.16);
  transform: translateY(-4px);
}

.tutorial-cover {
  display: block;
  min-height: 170px;
  background-position: center;
  background-size: cover;
  transition: transform 520ms ease;
}

.tutorial-card:hover .tutorial-cover {
  transform: scale(1.035);
}

.tutorial-card > div {
  padding: 18px;
}

.tutorial-card h2 {
  margin: 8px 0;
  color: #3d5661;
  font-family: "Noto Serif SC", serif;
  font-size: 19px;
}

.tutorial-card p,
.tutorial-card span {
  color: #87969c;
  line-height: 1.72;
}

.tutorial-read {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  color: #bd6867;
  font-weight: 700;
  text-decoration: none;
}

.tutorial-read::after {
  content: " →";
  margin-left: 4px;
  transition: transform 180ms ease;
}

.tutorial-read:hover::after {
  transform: translateX(3px);
}

@media (max-width: 700px) {
  .reading-progress {
    height: 2px;
  }

  .article-lightbox,
  .gallery-lightbox {
    padding: 52px 12px 18px;
  }

  .article-lightbox-close,
  .gallery-lightbox-close {
    top: 10px;
    right: 12px;
  }

  .gallery-lightbox-toolbar {
    top: 15px;
    left: 14px;
  }

  .gallery-lightbox-nav {
    top: auto;
    bottom: 18px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    transform: none;
  }

  .gallery-lightbox-prev {
    left: calc(50% - 58px);
  }

  .gallery-lightbox-next {
    right: calc(50% - 58px);
  }

  .gallery-lightbox-nav:hover {
    transform: scale(1.04);
  }

  .gallery-grid,
  .tutorial-list {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

/* Final interaction polish */
:root {
  scrollbar-color: rgba(101, 143, 155, 0.68) rgba(234, 241, 243, 0.78);
  scrollbar-width: thin;
}

::selection {
  color: #fff;
  background: rgba(205, 109, 109, 0.82);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(234, 241, 243, 0.78);
}

::-webkit-scrollbar-thumb {
  border: 2px solid rgba(234, 241, 243, 0.78);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(224, 139, 128, 0.82), rgba(101, 143, 155, 0.82));
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #d98078, #56899a);
}

.public-page :where(a, button, input, textarea, select):focus-visible,
.detail-public :where(a, button, input, textarea, select):focus-visible,
.about-public :where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid rgba(213, 119, 116, 0.24);
  outline-offset: 3px;
}

.public-page .feed-header,
.detail-public .feed-header {
  border-bottom-color: rgba(204, 218, 224, 0.76);
}

.public-page .feed-header h2,
.detail-public .feed-header h2 {
  color: #3e5863;
  font-family: "Noto Serif SC", serif;
  letter-spacing: 0.05em;
}

.public-page :where(input, select, textarea) {
  color: #53676f;
  border-color: rgba(199, 215, 222, 0.86);
  border-radius: 8px;
  background: rgba(251, 253, 253, 0.86);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.public-page :where(input, select, textarea):focus {
  border-color: rgba(210, 126, 119, 0.7);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(216, 132, 122, 0.1);
}

.public-page .tag-button,
.public-page .pagination button {
  color: #60737c;
  border-color: rgba(199, 215, 222, 0.88);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.public-page .tag-button:hover,
.public-page .pagination button:hover:not(:disabled) {
  color: #b96565;
  border-color: rgba(216, 132, 122, 0.58);
  background: rgba(249, 234, 228, 0.76);
  box-shadow: 0 5px 12px rgba(77, 105, 115, 0.08);
  transform: translateY(-1px);
}

.public-page .tag-button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #dc887c, #c96c70);
  box-shadow: 0 6px 13px rgba(198, 105, 106, 0.2);
}

.public-page .pagination {
  gap: 10px;
  margin-top: 24px;
}

.public-page .pagination button {
  min-height: 34px;
  padding: 0 15px;
}

.public-page .pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.public-page .pagination span {
  color: #8e9ca1;
  font-size: 13px;
}

.detail-public .article-nav {
  gap: 12px;
  margin-top: 25px;
}

.detail-public .article-nav a {
  min-height: 40px;
  padding: 0 15px;
  color: #61747c;
  border: 1px solid rgba(201, 215, 222, 0.86);
  border-radius: 999px;
  background: rgba(250, 252, 252, 0.88);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.detail-public .article-nav a:hover {
  color: #b96565;
  border-color: rgba(216, 132, 122, 0.62);
  background: rgba(249, 234, 228, 0.72);
  box-shadow: 0 6px 14px rgba(77, 105, 115, 0.09);
  transform: translateY(-2px);
}

.back-to-top {
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid rgba(201, 216, 224, 0.8);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 22px rgba(47, 79, 94, 0.13);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: opacity 220ms ease, transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.back-to-top::before {
  content: "↑";
  display: grid;
  position: absolute;
  inset: 0;
  z-index: 2;
  place-items: center;
  color: #b96565;
  font-size: 20px;
  font-weight: 700;
}

.back-to-top img {
  opacity: 0.16;
}

.back-to-top:hover {
  border-color: rgba(215, 128, 120, 0.68);
  box-shadow: 0 11px 26px rgba(71, 104, 117, 0.18);
  transform: translateY(-3px);
}

.back-to-top.show {
  animation: backTopBreathe 3.6s ease-in-out infinite;
}

@keyframes backTopBreathe {
  0%,
  100% {
    box-shadow: 0 8px 22px rgba(47, 79, 94, 0.13);
  }

  50% {
    box-shadow: 0 10px 26px rgba(203, 111, 110, 0.22);
  }
}

.gallery-page,
.tutorial-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(247, 250, 251, 0.9), rgba(247, 250, 251, 0.9)),
    var(--site-bg-image) center / cover fixed;
}

.gallery-page h1,
.tutorial-page h1 {
  color: #38525e;
  font-family: "Noto Serif SC", serif;
  letter-spacing: 0.08em;
}

@media (max-width: 700px) {
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  .back-to-top {
    right: 14px;
    bottom: 16px;
    width: 43px;
    height: 43px;
  }

  .detail-public .article-nav a {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Navigation compression and page finishing touches */
.public-page .site-nav,
.detail-public .anime-topbar,
.public-page .site-logo,
.detail-public .anime-topbar a,
.public-page .site-nav-item {
  transition:
    min-height 240ms ease,
    padding 240ms ease,
    box-shadow 240ms ease,
    background 240ms ease,
    font-size 240ms ease;
}

.public-page.nav-compact .site-nav,
.detail-public.nav-compact .anime-topbar {
  min-height: 50px;
  background: rgba(248, 251, 252, 0.9);
  box-shadow: 0 4px 18px rgba(38, 67, 80, 0.12);
}

.public-page.nav-compact .site-logo,
.detail-public.nav-compact .anime-topbar a,
.public-page.nav-compact .site-nav-item {
  min-height: 50px;
}

.public-page.nav-compact .brand-title,
.detail-public.nav-compact .brand-title {
  font-size: 18px;
}

.public-page.nav-compact .brand-seal,
.detail-public.nav-compact .brand-seal {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  font-size: 7px;
}

.public-page .profile-card,
.detail-public .profile-card,
.public-page .anime-widget,
.detail-public .anime-widget,
.about-public .about-card {
  box-shadow:
    0 8px 24px rgba(46, 82, 99, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.public-page .profile-card::after,
.detail-public .profile-card::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -54px;
  width: 108px;
  height: 108px;
  border: 14px solid rgba(102, 160, 176, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.public-page .site-main,
.detail-public .anime-detail-wrap,
.about-public .detail-page,
.gallery-page main,
.tutorial-page main {
  animation: contentRiseIn 520ms ease both;
}

@keyframes contentRiseIn {
  from {
    opacity: 0;
    transform: translateY(9px);
  }

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

.public-page .profile-card img,
.detail-public .profile-card img {
  transition: box-shadow 240ms ease, transform 320ms ease;
}

.public-page .profile-card img:hover,
.detail-public .profile-card img:hover {
  box-shadow:
    0 8px 20px rgba(37, 72, 88, 0.2),
    0 0 0 5px rgba(224, 143, 130, 0.12);
  transform: translateY(-2px);
}

.public-page .site-notice {
  overflow: hidden;
  border: 1px solid rgba(219, 176, 157, 0.54);
  border-radius: 10px;
  background: linear-gradient(100deg, rgba(252, 238, 230, 0.88), rgba(247, 251, 251, 0.82));
  box-shadow: 0 6px 16px rgba(65, 94, 106, 0.07);
}

.public-page .site-notice::before {
  content: "日";
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  margin-right: 8px;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #eca17f, #cf7073);
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 700px) {
  .public-page.nav-compact .site-nav {
    min-height: auto;
  }

  .public-page.nav-compact .site-logo {
    min-height: 42px;
  }

  .public-page.nav-compact .site-nav-item {
    min-height: 33px;
  }

  .public-page.nav-compact .brand-title,
  .detail-public.nav-compact .brand-title {
    font-size: 15px;
  }
}

/* Keep homepage article cards clean: no colored outline. */
.public-page .front-post-card,
.public-page .front-post-card:first-child,
body[data-template="compact"].public-page .front-post-card:first-child,
body[data-template="magazine"].public-page .front-post-card:first-child,
.public-page .front-post-card:hover {
  border-color: transparent;
}

/* Six switchable public color themes */
body[data-theme="misty-mountain"] {
  --theme-deep: #2F4658;
  --theme-strong: #5F7481;
  --theme-accent: #5F7481;
  --theme-muted: #AEB8B8;
  --theme-soft: #E8E2D6;
  --theme-paper: #F4E9D3;
  --theme-card: rgba(248, 245, 236, 0.9);
  --theme-nav: rgba(244, 239, 226, 0.84);
  --theme-shadow: rgba(47, 70, 88, 0.15);
}

body[data-theme="amber-study"] {
  --theme-deep: #3A2615;
  --theme-strong: #6B3F16;
  --theme-accent: #B47A35;
  --theme-muted: #D6A15A;
  --theme-soft: #E8D1A8;
  --theme-paper: #FBF4E8;
  --theme-card: rgba(255, 249, 238, 0.92);
  --theme-nav: rgba(248, 237, 215, 0.88);
  --theme-shadow: rgba(58, 38, 21, 0.16);
}

body[data-theme="pine-mist"] {
  --theme-deep: #18382D;
  --theme-strong: #36564A;
  --theme-accent: #7F9788;
  --theme-muted: #7F9788;
  --theme-soft: #DCE3D9;
  --theme-paper: #F1EFE6;
  --theme-card: rgba(247, 248, 242, 0.91);
  --theme-nav: rgba(241, 244, 237, 0.86);
  --theme-shadow: rgba(24, 56, 45, 0.15);
}

body[data-theme="moonlight-silver"] {
  --theme-deep: #26384A;
  --theme-strong: #6D8798;
  --theme-accent: #6D8798;
  --theme-muted: #B8C8D2;
  --theme-soft: #E6EEF2;
  --theme-paper: #F7F8F6;
  --theme-card: rgba(251, 253, 253, 0.92);
  --theme-nav: rgba(239, 245, 247, 0.88);
  --theme-shadow: rgba(38, 56, 74, 0.15);
}

body[data-theme="wine-cream"] {
  --theme-deep: #4A1F22;
  --theme-strong: #7D3B35;
  --theme-accent: #C8927E;
  --theme-muted: #C8927E;
  --theme-soft: #E6D5C4;
  --theme-paper: #F5EEE6;
  --theme-card: rgba(253, 248, 243, 0.92);
  --theme-nav: rgba(248, 239, 232, 0.88);
  --theme-shadow: rgba(74, 31, 34, 0.15);
}

body[data-theme="deep-ocean"] {
  --theme-deep: #061A33;
  --theme-strong: #0A3A78;
  --theme-accent: #1F8FE5;
  --theme-muted: #B8E4FF;
  --theme-soft: #B8E4FF;
  --theme-paper: #EDF7FF;
  --theme-card: rgba(246, 252, 255, 0.93);
  --theme-nav: rgba(235, 247, 255, 0.9);
  --theme-shadow: rgba(6, 26, 51, 0.18);
}

body[data-theme] {
  --moe-ink: var(--theme-deep);
  --moe-muted: var(--theme-strong);
  --moe-line: var(--theme-soft);
  --moe-card: var(--theme-card);
  --moe-card-solid: var(--theme-paper);
  --moe-blue: var(--theme-accent);
  --anime-blue: var(--theme-accent);
  --ink: var(--theme-deep);
  --muted: var(--theme-strong);
  --paper: var(--theme-paper);
  --panel: var(--theme-card);
  --line: var(--theme-soft);
  --leaf: var(--theme-accent);
  --leaf-dark: var(--theme-strong);
  --clay: var(--theme-accent);
  --gold: var(--theme-muted);
}

body[data-theme] .site-nav,
body[data-theme].detail-public .anime-topbar {
  border-bottom-color: var(--theme-soft);
  background: var(--theme-nav);
  box-shadow: 0 3px 18px var(--theme-shadow);
}

body[data-theme] .site-nav-item,
body[data-theme].detail-public .anime-topbar a {
  color: var(--theme-strong);
}

body[data-theme] .site-nav-item:hover,
body[data-theme] .site-nav-item.active,
body[data-theme].detail-public .anime-topbar a:hover {
  color: var(--theme-accent);
  background: var(--theme-card);
}

body[data-theme] .site-nav-item::after,
body[data-theme].detail-public .anime-topbar .detail-nav-items a::after {
  background: linear-gradient(90deg, var(--theme-accent), var(--theme-strong));
}

body[data-theme] .site-hero-content h1 {
  background: linear-gradient(105deg, #fff 0%, var(--theme-paper) 34%, var(--theme-muted) 56%, var(--theme-paper) 72%, #fff 100%);
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
}

body[data-theme].detail-public .anime-hero-title h1,
body[data-theme] .content-index-hero h1 {
  color: #fff;
  text-shadow: 0 2px 12px var(--theme-shadow);
}

body[data-theme] .content-index-heading h2 {
  color: var(--theme-deep);
}

body[data-theme] .brand-title {
  background: linear-gradient(110deg, var(--theme-deep), var(--theme-strong) 72%, var(--theme-accent));
  -webkit-background-clip: text;
  background-clip: text;
}

body[data-theme] .brand-wordmark::before {
  background: linear-gradient(145deg, var(--theme-muted), var(--theme-accent));
  box-shadow: 0 0 12px var(--theme-shadow);
}

body[data-theme] .brand-wordmark::after {
  background: linear-gradient(90deg, transparent, var(--theme-accent) 24%, var(--theme-strong) 72%, transparent);
}

body[data-theme] .brand-seal {
  color: var(--theme-strong);
  border-color: var(--theme-accent);
}

body[data-theme] .brand-lockup:hover .brand-seal {
  color: var(--theme-paper);
  background: var(--theme-strong);
}

body[data-theme] .profile-card,
body[data-theme] .anime-widget,
body[data-theme].detail-public .anime-article-card,
body[data-theme].detail-public .anime-comments-card,
body[data-theme].about-public .about-card,
body[data-theme] .gallery-card,
body[data-theme] .gallery-item,
body[data-theme] .tutorial-card {
  border-color: var(--theme-soft);
  background: var(--theme-card);
  box-shadow: 0 8px 24px var(--theme-shadow);
}

/* Keep the homepage article list floating directly on the background. */
.public-page .site-feed,
body[data-theme] .site-feed {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-theme] .front-post-card,
body[data-theme] .front-post-card:first-child,
body[data-theme] .front-post-card:hover {
  border-color: transparent;
  background: var(--theme-card);
  box-shadow: 0 8px 24px var(--theme-shadow);
}

/* Keep homepage article cards clean across every theme: no divider line. */
.public-page .front-post-card,
.public-page .front-post-card:first-child,
.public-page .front-post-card:hover,
body[data-theme] .front-post-card,
body[data-theme] .front-post-card:first-child,
body[data-theme] .front-post-card:hover {
  border-color: transparent;
}

.public-page .front-post-content .post-meta,
body[data-theme] .front-post-content .post-meta {
  border-top: 0;
}

body[data-theme] .front-post-card:hover,
body[data-theme] .gallery-card:hover,
body[data-theme] .gallery-item:hover,
body[data-theme] .tutorial-card:hover {
  box-shadow: 0 15px 34px var(--theme-shadow);
}

body[data-theme] .front-post-content h3,
body[data-theme] .front-post-content h3 a,
body[data-theme] .anime-widget h3,
body[data-theme].detail-public .anime-article-card h1,
body[data-theme].detail-public .comment-section-heading h2,
body[data-theme] .tutorial-card h2,
body[data-theme].about-public .about-card h1 {
  color: var(--theme-deep);
}

body[data-theme] .front-post-content p,
body[data-theme] .front-post-content .post-meta,
body[data-theme] .side-list span,
body[data-theme].detail-public .anime-article-card .article-content,
body[data-theme].detail-public .comment-card-body > p,
body[data-theme] .tutorial-card p,
body[data-theme] .tutorial-card span,
body[data-theme].about-public .article-content {
  color: var(--theme-strong);
}

body[data-theme] .post-tags span,
body[data-theme].detail-public .anime-article-card .article-tags span {
  color: var(--theme-strong);
  border-color: var(--theme-soft);
  background: var(--theme-paper);
}

body[data-theme] .side-list a:hover,
body[data-theme] .tag-button:hover,
body[data-theme] .pagination button:hover:not(:disabled),
body[data-theme].detail-public .article-nav a:hover {
  color: var(--theme-strong);
  border-color: var(--theme-muted);
  background: var(--theme-paper);
}

body[data-theme] .side-list a::before,
body[data-theme] .tag-button.active,
body[data-theme].detail-public .anime-comments-card .save-button {
  background: linear-gradient(135deg, var(--theme-accent), var(--theme-strong));
}

body[data-theme].detail-public .anime-article-card .article-summary,
body[data-theme].detail-public .anime-article-card .article-content blockquote {
  border-left-color: var(--theme-accent);
  background: var(--theme-paper);
}

body[data-theme].detail-public .anime-article-card .article-content h2,
body[data-theme].detail-public .anime-article-card .article-content h3 {
  color: var(--theme-deep);
  border-left-color: var(--theme-accent);
  background: var(--theme-paper);
}

body[data-theme].detail-public .article-like-panel {
  border-color: var(--theme-soft);
  background: linear-gradient(135deg, var(--theme-card), var(--theme-paper));
  box-shadow: 0 10px 26px var(--theme-shadow);
}

body[data-theme].detail-public .article-like-copy span,
body[data-theme].detail-public .article-like-button {
  color: var(--theme-accent);
}

body[data-theme].detail-public .article-like-button {
  border-color: var(--theme-muted);
}

body[data-theme].detail-public .article-like-button.is-liked {
  color: #fff;
  border-color: var(--theme-accent);
  background: linear-gradient(135deg, var(--theme-accent), var(--theme-strong));
}

body[data-theme] .reading-progress-bar,
body[data-theme] .public-footer::before {
  background: linear-gradient(90deg, var(--theme-accent), var(--theme-strong), var(--theme-muted));
}

/* Keep every public footer borderless across all themes. */
.public-footer,
.public-page .public-footer,
.detail-public .public-footer,
.about-public .public-footer,
body[data-theme] .public-footer {
  border-top: 0;
}

.public-page .public-footer::before,
.detail-public .public-footer::before,
.about-public .public-footer::before,
body[data-theme] .public-footer::before {
  content: none;
  display: none;
}

/* A calm, compact footer with no hard divider above it. */
.public-footer,
.public-page .public-footer,
.detail-public .public-footer,
.about-public .public-footer,
body[data-theme] .public-footer {
  margin-top: 48px;
  padding: 24px max(20px, calc((100vw - 1140px) / 2)) 26px;
  color: var(--theme-strong, #5f7481);
  border: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(232, 238, 240, 0.84)),
    var(--theme-paper, #e8e2d6);
  box-shadow: 0 -10px 34px rgba(33, 61, 76, 0.07);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.public-footer .site-runtime {
  display: inline-flex;
  width: auto;
  min-height: 38px;
  margin: 0 auto 10px;
  padding: 6px 12px 6px 14px;
  gap: 8px;
  color: var(--theme-strong, #5f7481);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 5px 18px rgba(43, 76, 94, 0.07);
}

.public-footer .site-runtime::after {
  content: none;
}

.public-footer .runtime-clock {
  color: var(--theme-deep, #2f4658);
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.public-footer .runtime-signal {
  width: 8px;
  height: 8px;
  background: #6cdaa0;
  box-shadow: 0 0 0 4px rgba(108, 218, 160, 0.12), 0 0 14px rgba(108, 218, 160, 0.52);
}

.public-footer .runtime-love {
  width: 31px;
  height: 24px;
  margin-left: 3px;
}

.public-footer > div {
  display: inline-flex;
  width: auto;
  margin: 0 auto;
  padding: 6px 13px;
  gap: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.27);
}

.public-footer > div strong,
.public-page .public-footer strong,
.detail-public .public-footer strong,
.about-public .public-footer strong {
  color: var(--theme-deep, #2f4658);
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.public-footer > div strong::after {
  width: 4px;
  height: 4px;
  margin-left: 11px;
  border-radius: 50%;
  background: var(--theme-muted, #aeb8b8);
  vertical-align: 3px;
}

.public-footer > div span {
  color: var(--theme-strong, #5f7481);
}

/* Match both profile actions visually while preserving their separate behaviors. */
.public-page .profile-social-github,
.detail-public .profile-social-github,
.public-page .profile-social-qq,
.detail-public .profile-social-qq {
  color: var(--theme-deep, #2f4658);
  border-color: var(--theme-soft, #e8e2d6);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), var(--theme-paper, #f4e9d3));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 7px 16px var(--theme-shadow, rgba(47, 70, 88, 0.12));
}

.public-page .profile-social-github:hover,
.detail-public .profile-social-github:hover,
.public-page .profile-social-github:focus-visible,
.detail-public .profile-social-github:focus-visible,
.public-page .profile-social-qq:hover,
.detail-public .profile-social-qq:hover,
.public-page .profile-social-qq:focus-visible,
.detail-public .profile-social-qq:focus-visible {
  color: #fff;
  border-color: var(--theme-accent, #5f7481);
  background: linear-gradient(135deg, var(--theme-accent, #5f7481), var(--theme-strong, #5f7481));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 22px var(--theme-shadow, rgba(47, 70, 88, 0.16));
}

.public-page .profile-social-github:active,
.detail-public .profile-social-github:active,
.public-page .profile-social-qq:active,
.detail-public .profile-social-qq:active {
  transform: translateY(-1px) scale(0.985);
}

.public-page .profile-social-qq.is-copied,
.detail-public .profile-social-qq.is-copied,
.public-page .profile-social-qq.is-copied:hover,
.detail-public .profile-social-qq.is-copied:hover {
  color: var(--theme-deep, #2f4658);
  border-color: var(--theme-muted, #aeb8b8);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), var(--theme-soft, #e8e2d6));
  box-shadow: inset 0 1px 0 #fff, 0 10px 22px var(--theme-shadow, rgba(47, 70, 88, 0.14));
}

/* Compact social icon row inspired by the reference profile card. */
.public-page .profile-socials,
.detail-public .profile-socials {
  gap: 14px;
}

.public-page .profile-social,
.detail-public .profile-social {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  box-shadow: none;
  transition: color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.public-page .profile-social svg,
.detail-public .profile-social svg {
  width: 26px;
  height: 26px;
}

.public-page .profile-social-github,
.detail-public .profile-social-github {
  color: #24292f;
}

.public-page .profile-social-qq,
.detail-public .profile-social-qq {
  color: #2aa8d8;
}

.public-page .profile-social-netease,
.detail-public .profile-social-netease {
  color: #e60026;
}

.public-page .profile-social:hover,
.detail-public .profile-social:hover,
.public-page .profile-social:focus-visible,
.detail-public .profile-social:focus-visible {
  color: var(--theme-accent, #5f7481);
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0.82;
  transform: translateY(-2px) scale(1.08);
}

.public-page .profile-social-netease:hover,
.detail-public .profile-social-netease:hover,
.public-page .profile-social-netease:focus-visible,
.detail-public .profile-social-netease:focus-visible {
  color: #ff1744;
}

.public-page .profile-social-qq.is-copied,
.detail-public .profile-social-qq.is-copied,
.public-page .profile-social-qq.is-copied:hover,
.detail-public .profile-social-qq.is-copied:hover {
  color: var(--theme-accent, #5f7481);
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* Desktop profile card size supplied by the site owner. */
@media (min-width: 981px) {
  .public-page .site-main {
    grid-template-columns: minmax(0, 1fr) 370.7px;
  }

  .detail-public .anime-detail-wrap {
    width: min(1114.7px, calc(100% - 28px));
  }

  .detail-public .anime-detail-upper {
    grid-template-columns: minmax(0, 720px) 370.7px;
  }

  .public-page .profile-card,
  .detail-public .profile-card {
    box-sizing: border-box;
    width: 370.7px;
    height: 261.7px;
    min-height: 261.7px;
    padding: 0 16px 7px;
  }

  .public-page .profile-card h3,
  .detail-public .profile-card h3 {
    margin: 4px 0 2px;
    line-height: 1.2;
  }

  .public-page .profile-card p,
  .detail-public .profile-card p {
    margin-bottom: 5px;
    line-height: 1.55;
  }

  .public-page .profile-stats,
  .detail-public .profile-stats {
    padding-top: 6px;
  }

  .public-page .profile-socials,
  .detail-public .profile-socials {
    position: absolute;
    right: 16px;
    bottom: 7px;
    left: 16px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
}

@media (max-width: 560px) {
  .public-footer,
  .public-page .public-footer,
  .detail-public .public-footer,
  .about-public .public-footer,
  body[data-theme] .public-footer {
    margin-top: 38px;
    padding: 20px 14px 22px;
  }

  .public-footer .site-runtime {
    padding-right: 10px;
    padding-left: 11px;
    font-size: 12px;
    letter-spacing: 0;
  }

  .public-footer .runtime-clock {
    letter-spacing: 0.03em;
  }

  .public-footer > div {
    display: grid;
    gap: 3px;
    padding: 8px 14px;
  }

  .public-footer > div strong::after {
    content: none;
  }
}

/* Refined public footer: one soft glass panel for runtime and site copy. */
.public-footer,
.public-page .public-footer,
.detail-public .public-footer,
.about-public .public-footer,
body[data-theme] .public-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: 28px;
  padding-bottom: 30px;
  background:
    radial-gradient(circle at 30% 0, rgba(221, 148, 130, 0.13), transparent 30%),
    radial-gradient(circle at 72% 100%, rgba(93, 150, 168, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.64), rgba(232, 239, 241, 0.88)),
    var(--theme-paper, #e8e2d6);
  box-shadow: 0 -12px 36px rgba(33, 61, 76, 0.08);
}

.public-footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(760px, 74vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(219, 144, 126, 0.72), rgba(104, 157, 173, 0.72), transparent);
  box-shadow: 0 0 22px rgba(104, 157, 173, 0.2);
  transform: translateX(-50%);
}

.public-footer .footer-panel,
.public-footer > .footer-panel {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  padding: 7px 10px;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(247, 250, 250, 0.46));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 10px 26px rgba(43, 76, 94, 0.09);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.public-footer .footer-panel:hover {
  border-color: rgba(255, 255, 255, 0.96);
  box-shadow:
    inset 0 1px 0 #fff,
    0 13px 30px rgba(43, 76, 94, 0.13);
  transform: translateY(-2px);
}

.public-footer .footer-panel .site-runtime {
  min-height: 34px;
  margin: 0;
  padding: 3px 12px 3px 7px;
  gap: 8px;
  background: transparent;
  box-shadow: none;
  white-space: nowrap;
}

.public-footer .runtime-label {
  color: var(--theme-strong, #667b84);
  letter-spacing: 0.04em;
}

.public-footer .runtime-divider {
  width: 1px;
  height: 18px;
  margin: 0 1px 0 3px;
  background: linear-gradient(180deg, transparent, rgba(133, 157, 166, 0.46), transparent);
}

.public-footer .footer-panel > div {
  display: inline-flex;
  width: auto;
  margin: 0;
  padding: 4px 10px 4px 12px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 0;
  background: transparent;
}

.public-footer .footer-panel > div strong {
  font-size: 15px;
}

.public-footer .footer-panel > div span {
  color: var(--theme-strong, #70848c);
  font-size: 14px;
}

@media (max-width: 760px) {
  .public-footer,
  .public-page .public-footer,
  .detail-public .public-footer,
  .about-public .public-footer,
  body[data-theme] .public-footer {
    margin-top: 38px;
    padding: 22px 14px 24px;
  }

  .public-footer .footer-panel,
  .public-footer > .footer-panel {
    display: grid;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 22px;
  }

  .public-footer .footer-panel .site-runtime {
    padding: 2px 4px 7px;
    justify-content: center;
  }

  .public-footer .runtime-divider {
    display: none;
  }

  .public-footer .footer-panel > div {
    display: grid;
    padding: 7px 6px 2px;
    gap: 3px;
    border-top: 1px solid rgba(133, 157, 166, 0.18);
  }

  .public-footer .footer-panel > div strong::after {
    content: none;
  }
}

@media (max-width: 430px) {
  .public-footer .footer-panel .site-runtime {
    gap: 6px;
    font-size: 11px;
  }

  .public-footer .runtime-clock {
    font-size: 11px;
    letter-spacing: 0.01em;
  }

  .public-footer .runtime-love {
    width: 27px;
    height: 21px;
    margin-left: 0;
  }

  .public-footer .footer-panel > div span {
    font-size: 12px;
  }
}

/* Admin theme chooser */
.theme-palette-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.theme-palette-card {
  display: grid;
  gap: 9px;
  padding: 13px;
  color: #53676f;
  border: 1px solid rgba(199, 215, 222, 0.88);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.theme-palette-card:hover,
.theme-palette-card.is-active {
  border-color: rgba(206, 123, 114, 0.72);
  box-shadow: 0 8px 18px rgba(67, 95, 106, 0.1);
  transform: translateY(-2px);
}

.theme-palette-card.is-active {
  box-shadow: 0 0 0 3px rgba(212, 128, 118, 0.1), 0 8px 18px rgba(67, 95, 106, 0.1);
}

.theme-palette-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-palette-heading b {
  color: #c86f6c;
  font-size: 12px;
}

.theme-palette-heading strong {
  color: #405964;
  font-size: 14px;
}

.theme-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.theme-swatches i {
  height: 20px;
  border-radius: 4px;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.theme-palette-card small {
  color: #8b999e;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .theme-palette-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .theme-palette-grid {
    grid-template-columns: 1fr;
  }
}

/* The shared fixed homepage nav needs room inside content index heroes. */
.content-index-hero > .site-nav + div {
  padding-top: 106px;
}

/* Gallery management */
.gallery-editor-form {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.gallery-editor-preview {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border-radius: 10px;
  background: rgba(232, 239, 239, 0.88);
}

.gallery-editor-preview img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
}

.gallery-editor-preview span,
.gallery-admin-cover span {
  position: absolute;
  right: 9px;
  bottom: 9px;
  padding: 4px 8px;
  color: #fff;
  border-radius: 20px;
  background: rgba(31, 55, 63, 0.7);
  font-size: 12px;
}

.gallery-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.gallery-editor-fields label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.gallery-editor-fields input,
.gallery-editor-fields textarea {
  width: 100%;
}

.gallery-editor-fields small {
  color: var(--muted);
}

.gallery-editor-fields .wide-field,
.gallery-editor-fields .inline-check,
.gallery-editor-actions,
#galleryAdminStatus {
  grid-column: 1 / -1;
}

.gallery-editor-fields .inline-check {
  display: flex;
}

.gallery-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

#galleryAdminStatus {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
}

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

.gallery-admin-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 20px rgba(42, 76, 94, 0.07);
}

.gallery-admin-card.is-hidden {
  opacity: 0.68;
}

.gallery-admin-cover {
  position: relative;
}

.gallery-admin-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-admin-body {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.gallery-admin-body p {
  min-height: 40px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.gallery-admin-body small {
  color: var(--muted);
}

.gallery-admin-body .row-actions {
  justify-content: flex-start;
}

.gallery-admin-body button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 10px;
  color: var(--leaf-dark);
  background: rgba(255, 255, 255, 0.82);
}

@media (max-width: 700px) {
  .gallery-editor-form {
    grid-template-columns: 1fr;
  }

  .gallery-editor-fields {
    grid-template-columns: 1fr;
  }

  .gallery-editor-fields label,
  .gallery-editor-fields .wide-field,
  .gallery-editor-fields .inline-check,
  .gallery-editor-actions,
  #galleryAdminStatus {
    grid-column: auto;
  }
}

/* Compact gallery manager */
.gallery-manager-heading,
.gallery-library-heading {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
}

.gallery-manager-heading {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.gallery-manager-heading h2,
.gallery-manager-heading p,
.gallery-library-heading h3,
.gallery-library-heading p {
  margin: 0;
}

.gallery-manager-heading > span,
.gallery-library-heading > span {
  color: var(--muted);
  font-size: 13px;
}

.gallery-manager-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 172px));
  gap: 12px;
  margin: 18px 0;
}

.gallery-manager-stats article {
  display: flex;
  min-height: 76px;
  padding: 14px 16px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.66);
}

.gallery-manager-stats span {
  color: var(--muted);
  font-size: 13px;
}

.gallery-manager-stats strong {
  color: var(--leaf-dark);
  font-size: 25px;
  font-weight: 600;
}

.gallery-manager-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
}

.gallery-manager-toolbar .save-button,
.gallery-manager-toolbar .ghost-button {
  min-height: 38px;
  white-space: nowrap;
}

.gallery-manager-toolbar small {
  margin-left: auto;
  color: var(--muted);
  white-space: nowrap;
}

.gallery-search-box {
  display: flex;
  min-width: 220px;
  margin-left: auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.gallery-search-box span {
  padding-left: 11px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.gallery-search-box input {
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.gallery-editor-form[hidden] {
  display: none;
}

.gallery-editor-form {
  margin-bottom: 18px;
  border-radius: 10px;
  background: rgba(250, 252, 250, 0.82);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.82);
}

.gallery-editor-visual {
  display: grid;
  gap: 10px;
  align-content: start;
}

.gallery-upload-row {
  display: grid;
  gap: 6px;
}

.gallery-upload-row .ghost-button {
  width: 100%;
}

.gallery-upload-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.gallery-editor-intro {
  display: flex;
  grid-column: 1 / -1;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.gallery-editor-intro p,
.gallery-editor-intro h3 {
  margin: 0;
}

.gallery-editor-intro span {
  color: var(--muted);
  font-size: 12px;
}

.gallery-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.66);
}

.gallery-manager-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.gallery-manager-table th,
.gallery-manager-table td {
  padding: 11px 13px;
  color: var(--leaf-dark);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.gallery-manager-table th {
  color: var(--muted);
  background: rgba(242, 247, 245, 0.86);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.gallery-manager-table tbody tr {
  transition: background 160ms ease, opacity 160ms ease;
}

.gallery-manager-table tbody tr:hover {
  background: rgba(236, 245, 242, 0.72);
}

.gallery-manager-table tbody tr:last-child td {
  border-bottom: 0;
}

.gallery-manager-table tr.is-hidden {
  opacity: 0.62;
}

.gallery-manager-table input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--leaf);
}

.gallery-table-thumb {
  display: block;
  width: 68px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
}

.gallery-table-category,
.gallery-table-state {
  display: inline-flex;
  padding: 4px 8px;
  color: var(--muted);
  border-radius: 20px;
  background: rgba(116, 142, 135, 0.1);
  font-size: 12px;
  white-space: nowrap;
}

.gallery-table-state.is-visible {
  color: #36745e;
  background: rgba(78, 155, 125, 0.13);
}

.gallery-table-actions {
  display: flex;
  gap: 4px;
  white-space: nowrap;
}

.gallery-table-actions button {
  padding: 4px 5px;
  color: var(--leaf-dark);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}

.gallery-table-actions button:hover {
  color: #c66f6a;
}

@media (max-width: 760px) {
  .gallery-manager-heading,
  .gallery-editor-intro {
    display: grid;
    align-items: start;
  }

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

  .gallery-manager-stats article {
    display: grid;
    min-height: 70px;
    padding: 10px;
  }

  .gallery-manager-toolbar {
    flex-wrap: wrap;
  }

  .gallery-search-box {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .gallery-manager-toolbar small {
    margin-left: auto;
  }
}

/* Gallery add and edit page */
.gallery-editor-form {
  display: block;
  max-width: 760px;
  margin: 0 auto 18px;
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.gallery-editor-header {
  display: flex;
  min-height: 58px;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 251, 250, 0.82);
}

.gallery-editor-header p {
  display: flex;
  gap: 10px;
  margin: 0;
  color: var(--leaf-dark);
}

.gallery-editor-header span {
  color: var(--muted);
}

.gallery-editor-header b {
  font-weight: 500;
}

.gallery-editor-close {
  width: 34px;
  height: 34px;
  color: var(--muted);
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.gallery-editor-close:hover {
  color: #c66f6a;
  background: rgba(198, 111, 106, 0.1);
}

.gallery-editor-content {
  display: grid;
  gap: 16px;
  padding: 22px 24px 24px;
}

.gallery-editor-label {
  display: grid;
  gap: 7px;
  color: var(--leaf-dark);
  font-size: 14px;
}

.gallery-editor-label input,
.gallery-editor-label select,
.gallery-editor-label textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
}

.gallery-upload-dropzone {
  display: grid;
  position: relative;
  min-height: 210px;
  padding: 20px;
  overflow: hidden;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: var(--leaf-dark);
  border: 1px dashed rgba(100, 139, 133, 0.74);
  border-radius: 9px;
  background: rgba(244, 249, 248, 0.62);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.gallery-upload-dropzone:hover,
.gallery-upload-dropzone.is-dragging {
  border-color: var(--leaf);
  background: rgba(226, 241, 237, 0.72);
  box-shadow: inset 0 0 0 3px rgba(89, 139, 126, 0.08);
}

.gallery-upload-dropzone.has-image {
  min-height: 280px;
  padding: 0;
  border-style: solid;
  background: rgba(22, 36, 38, 0.08);
}

.gallery-upload-dropzone img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(230, 238, 237, 0.8);
}

.gallery-upload-dropzone.has-image .gallery-upload-icon,
.gallery-upload-dropzone.has-image strong,
.gallery-upload-dropzone.has-image small,
.gallery-upload-dropzone.has-image em {
  display: none;
}

.gallery-upload-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--leaf);
  font-size: 24px;
  font-style: normal;
  line-height: 1;
}

.gallery-upload-dropzone small,
.gallery-upload-dropzone em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.gallery-editor-advanced {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(248, 251, 250, 0.72);
  font-size: 13px;
}

.gallery-editor-advanced summary {
  cursor: pointer;
}

.gallery-editor-advanced > div {
  display: grid;
  gap: 11px;
  padding-top: 12px;
}

.gallery-editor-advanced label {
  display: grid;
  gap: 5px;
}

.gallery-editor-advanced .inline-check {
  display: flex;
}

.gallery-editor-actions {
  justify-content: center;
  padding-top: 3px;
}

.gallery-editor-actions button {
  min-width: 126px;
}

@media (max-width: 620px) {
  .gallery-editor-content {
    padding: 18px 14px;
  }

  .gallery-upload-dropzone {
    min-height: 174px;
  }
}

/* Homepage journal list: compact horizontal entries inspired by travel logs. */
.home-page .front-post-list {
  grid-template-columns: 1fr;
  gap: 14px;
}

.home-page .front-post-card,
.home-page .front-post-card:first-child,
body[data-template="compact"].home-page .front-post-card:first-child,
body[data-template="magazine"].home-page .front-post-card:first-child,
body[data-theme].home-page .front-post-card,
body[data-theme].home-page .front-post-card:first-child {
  position: relative;
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  height: 184px;
  min-height: 184px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 11px;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.91), var(--theme-card, rgba(248, 252, 252, 0.82)));
  box-shadow: 0 7px 20px var(--theme-shadow, rgba(43, 76, 94, 0.11));
  cursor: pointer;
}

.home-page .front-post-card:focus-visible {
  outline: 2px solid var(--theme-accent, #7f9788);
  outline-offset: 3px;
}

.home-page .front-post-card::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--theme-accent, #7f9788), var(--theme-muted, #aeb8b8));
  opacity: 0.62;
}

.home-page .front-post-card:hover,
body[data-theme].home-page .front-post-card:hover {
  border-color: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 30px var(--theme-shadow, rgba(43, 76, 94, 0.16));
  transform: translateY(-3px);
}

.home-page .front-cover,
.home-page .front-post-card:first-child .front-cover,
body[data-template="compact"].home-page .front-post-card:first-child .front-cover,
body[data-template="magazine"].home-page .front-post-card:first-child .front-cover {
  position: relative;
  aspect-ratio: auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background-position: center;
  background-size: cover;
}

.home-page .front-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.32);
  pointer-events: none;
}

.home-page .front-cover-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  padding: 4px 8px;
  color: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(29, 56, 64, 0.44);
  box-shadow: 0 4px 12px rgba(21, 40, 48, 0.16);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.home-page .front-post-content {
  position: relative;
  display: flex;
  min-width: 0;
  overflow: hidden;
  padding: 17px 18px 13px;
  flex-direction: column;
}

.home-page .post-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.home-page .front-post-content h3,
.home-page .front-post-card:first-child h3,
body[data-template="compact"].home-page .front-post-card:first-child h3,
body[data-template="magazine"].home-page .front-post-card:first-child h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--theme-deep, #334a56);
  font-family: "Noto Serif SC", serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-page .post-flags {
  flex: 0 0 auto;
  padding: 3px 7px;
  color: var(--theme-strong, #5f7481);
  border: 1px solid var(--theme-soft, #dce3d9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  line-height: 1;
}

.home-page .front-post-content .post-summary {
  display: -webkit-box;
  margin: 9px 0 0;
  overflow: hidden;
  color: var(--theme-strong, #71808a);
  font-size: 14px;
  line-height: 1.8;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-page .post-card-footer {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  min-width: 0;
  margin-top: auto;
  padding-top: 10px;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(141, 163, 168, 0.15);
}

.home-page .front-post-content .post-meta {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 0;
  order: initial;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px 12px;
  color: var(--theme-strong, #8c9aa2);
  border: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1.3;
}

.home-page .front-post-content .post-meta span {
  gap: 3px;
}

.home-page .post-tags {
  display: flex;
  width: 112px;
  margin: 0;
  overflow: hidden;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 5px;
}

.home-page .front-post-content .read-more {
  display: inline-flex;
  padding: 4px 8px;
  align-items: center;
  justify-self: end;
  gap: 4px;
  color: var(--theme-strong, #5f7481);
  border: 1px solid var(--theme-soft, #dce3d9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.home-page .front-post-content .read-more:hover {
  color: #fff;
  border-color: var(--theme-accent, #7f9788);
  background: var(--theme-strong, #5f7481);
  transform: translateX(2px);
}

.home-page .front-post-content .read-more .arrow-icon {
  width: 12px;
  height: 12px;
}

.home-page .post-tags span,
body[data-theme].home-page .post-tags span {
  padding: 3px 7px;
  color: var(--theme-strong, #5f7481);
  border: 1px solid var(--theme-soft, #dce3d9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  font-size: 11px;
  line-height: 1.1;
}

@media (max-width: 760px) {
  .home-page .front-post-card,
  .home-page .front-post-card:first-child,
  body[data-template="compact"].home-page .front-post-card:first-child,
  body[data-template="magazine"].home-page .front-post-card:first-child,
  body[data-theme].home-page .front-post-card,
  body[data-theme].home-page .front-post-card:first-child {
    grid-template-columns: 154px minmax(0, 1fr);
    height: 158px;
    min-height: 158px;
  }

  .home-page .front-post-content {
    padding: 13px 14px 10px;
  }

  .home-page .front-post-content h3,
  .home-page .front-post-card:first-child h3 {
    font-size: 17px;
  }

  .home-page .front-post-content .post-summary {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.65;
  }

  .home-page .post-card-footer {
    grid-template-columns: minmax(0, 1fr) max-content;
    padding-top: 7px;
  }

  .home-page .front-post-content .post-meta {
    gap: 4px 9px;
    font-size: 11px;
  }

  .home-page .post-tags {
    display: none;
    width: auto;
  }

}

@media (max-width: 460px) {
  .home-page .front-post-card,
  .home-page .front-post-card:first-child,
  body[data-template="compact"].home-page .front-post-card:first-child,
  body[data-template="magazine"].home-page .front-post-card:first-child,
  body[data-theme].home-page .front-post-card,
  body[data-theme].home-page .front-post-card:first-child {
    grid-template-columns: 112px minmax(0, 1fr);
    height: 132px;
    min-height: 132px;
  }

  .home-page .front-cover-badge {
    right: 7px;
    bottom: 7px;
    padding: 3px 6px;
    font-size: 10px;
  }

  .home-page .front-post-content {
    padding: 10px 10px 8px;
  }

  .home-page .front-post-content h3,
  .home-page .front-post-card:first-child h3 {
    font-size: 15px;
  }

  .home-page .post-flags {
    padding: 2px 5px;
    font-size: 10px;
  }

  .home-page .front-post-content .post-summary {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
  }

  .home-page .post-card-footer {
    padding-top: 5px;
  }

  .home-page .front-post-content .post-meta {
    gap: 3px 7px;
    font-size: 10px;
  }

  .home-page .front-post-content .post-meta span:nth-child(n + 3) {
    display: none;
  }

  .home-page .front-post-content .read-more {
    padding: 3px 6px;
    font-size: 10px;
  }

  .home-page .front-post-content .read-more .arrow-icon {
    display: none;
  }
}
