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

html {
  font-size: 58%;
}

body {
  background: #fafafa;
  color: #202124;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Droid Sans Fallback", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

a {
  color: #202124;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

a:hover {
  color: #006cff;
}

.main {
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  text-align: center;
  padding: 46px 24px 28px;
}

.avatar {
  width: 64px;
  height: 64px;
  /* deslop-ignore-next-line 19: author avatar, not a generic rounded UI surface */
  border-radius: 50%;
  object-fit: cover;
}

.site-title {
  margin-top: 16px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
}

.site-description {
  margin-top: 10px;
  color: #70757a;
  font-size: 15px;
}

.menu-container {
  margin-top: 24px;
}

.menu {
  display: inline-block;
  margin: 0 11px;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  font-size: 14px;
  color: #5f6368;
}

.menu:hover {
  border-color: #006cff;
}

.post-list-container,
.post-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.post-inner {
  width: 100%;
  max-width: 860px;
}

.post-card {
  margin: 18px 24px;
  border: 1px solid #e8eaed;
  border-radius: 6px;
  padding: 24px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  box-shadow: none;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.post-card:hover {
  border-color: #cfd4dc;
  background: #fff;
}

.post-left {
  width: 100%;
}

.post-title {
  color: #202124;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.48;
}

.sticky-top-flag {
  color: #006cff;
  background: #eef5ff;
  padding: 2px 7px;
  font-size: 12px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
}

.post-abstract {
  display: block;
  margin-top: 12px;
  color: #5f6368;
  font-size: 14px;
  line-height: 1.75;
}

.post-abstract:hover {
  color: #006cff;
}

.post-info {
  margin-top: 14px;
  color: #8a9099;
  font-size: 12px;
}

.post-tag {
  margin-left: 10px;
  color: #70757a;
  font-size: 12px;
}

.post-feature-image {
  width: 176px;
  height: 96px;
  flex: 0 0 176px;
  margin-left: 24px;
  border-radius: 2px;
  background-position: center;
  background-size: cover;
}

.pagination-container {
  padding: 24px 32px 32px;
}

.prev-page,
.next-page {
  margin: 0 16px;
  font-size: 14px;
}

.post-detail {
  width: 760px;
  max-width: calc(100% - 40px);
  border: 1px solid #e8eaed;
  border-radius: 6px;
  padding: 38px 42px 44px;
  background: #fff;
}

.post-detail > .post-title {
  padding: 0;
  text-align: left;
  font-size: 29px;
  font-weight: 700;
  line-height: 1.38;
}

.post-detail > .post-info {
  padding-bottom: 28px;
  text-align: left;
  border-bottom: 1px solid #eef0f2;
}

.post-content {
  margin-top: 30px;
}

.gt-post-content {
  word-break: normal;
  overflow-wrap: break-word;
}

.gt-post-content p,
.gt-post-content li {
  margin-bottom: 19px;
  font-size: 16px;
  line-height: 1.85;
  color: #303134;
}

.gt-post-content img {
  display: block;
  width: auto;
  max-width: min(100%, 520px);
  max-height: 640px;
  margin: 26px auto;
  border-radius: 2px;
  object-fit: contain;
}

.gt-post-content blockquote {
  margin: 18px 0 24px;
  padding: 10px 14px 10px 16px;
  border-left: 3px solid #006cff;
  background: #f8fbff;
  color: #4b5560;
}

.gt-post-content blockquote p {
  margin-bottom: 0;
  color: inherit;
  font-size: 15px;
  line-height: 1.65;
}

.gt-post-content hr {
  height: 1px;
  margin: 28px 0;
  border: 0;
  background: #eceff1;
}

.gt-post-content ul,
.gt-post-content ol {
  padding-left: 20px;
  margin-bottom: 16px;
  line-height: 1.725;
}

.gt-post-content h1,
.gt-post-content h2,
.gt-post-content h3,
.gt-post-content h4,
.gt-post-content h5,
.gt-post-content h6 {
  margin-bottom: 14px;
  padding-top: 18px;
  font-weight: 700;
  color: #202124;
}

.gt-post-content h1 { font-size: 28px; }
.gt-post-content h2 { font-size: 24px; }
.gt-post-content h3 { font-size: 20px; }
.gt-post-content h4 { font-size: 18px; }
.gt-post-content h5 { font-size: 16px; }
.gt-post-content h6 { font-size: 14px; }

.gt-post-content code {
  display: inline-block;
  padding: 0 6px;
  margin: 0 3px;
  border-radius: 4px;
  background: #f1f3f4;
  font-size: 13px;
}

.gt-post-content pre code {
  display: block;
  width: 100%;
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid #e8eaed;
  background: #f6f8fa;
  line-height: 1.55;
}

.post-nav {
  width: 760px;
  max-width: calc(100% - 40px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin: 26px auto 0;
  padding-top: 22px;
  border-top: 1px solid #eceff1;
}

.post-nav-item {
  min-height: 72px;
  padding: 4px 0;
}

.post-nav-item span {
  display: block;
  margin-bottom: 7px;
  color: #8a9099;
  font-size: 12px;
}

.post-nav-item strong {
  display: block;
  color: #202124;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
}

.post-nav-item:hover strong {
  color: #006cff;
}

.post-nav-next {
  text-align: right;
}

.post-nav-spacer {
  min-height: 1px;
}

.archive-container,
.tags-container,
.empty {
  width: 100%;
  max-width: 820px;
  margin: 16px auto 80px;
  padding: 0 26px;
}

.archive-container h2,
.tags-container h2,
.list-title {
  margin: 0 0 22px;
  font-size: 24px;
  font-weight: 700;
}

.list-heading {
  width: min(860px, calc(100% - 48px));
  margin: 0 auto 12px;
}

.list-heading h2 {
  font-size: 24px;
  line-height: 1.4;
}

.list-heading p {
  margin-top: 6px;
  color: #8a9099;
  font-size: 13px;
}

.archive-year {
  margin-top: 30px;
}

.archive-year h3 {
  margin-bottom: 10px;
  color: #202124;
  font-size: 20px;
  font-weight: 700;
}

.archive-item {
  display: flex;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid #eceff1;
}

.archive-item span {
  flex: 0 0 52px;
  color: #8a9099;
  font-size: 13px;
}

.archive-item strong {
  font-weight: 500;
}

.tag-item {
  display: inline-block;
  margin: 6px 8px 6px 0;
  padding: 8px 12px;
  border: 1px solid #e8eaed;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
}

.tag-item span {
  color: #8a9099;
}

.memos-container {
  width: 100%;
  max-width: 780px;
  margin: 0 auto 80px;
  padding: 0 24px;
}

.memo-timeline {
  margin-top: 22px;
}

.memo-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid #eef0f2;
}

.memo-date {
  padding-top: 4px;
  color: #999fa7;
  font-size: 13px;
  line-height: 1.6;
}

.memo-body {
  min-width: 0;
}

.memo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  color: #8a9099;
  font-size: 12px;
}

.memo-meta a {
  color: #8a9099;
}

.memo-meta span {
  border-radius: 3px;
  padding: 2px 6px;
  background: #f1f3f4;
  color: #70757a;
}

.memo-content p,
.memo-content li {
  margin-bottom: 11px;
}

.memo-content p:last-child,
.memo-content ul:last-child,
.memo-content ol:last-child,
.memo-content blockquote:last-child,
.memo-content pre:last-child {
  margin-bottom: 0;
}

.memo-empty {
  color: #8a9099;
  font-size: 15px;
}

.site-footer {
  padding: 28px 20px 42px;
  text-align: center;
  color: #8a9099;
  font-size: 12px;
}

.social-container {
  margin-bottom: 14px;
}

.social-container a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0 7px;
  color: #999fa7;
  font-size: 16px;
}

.social-container a:hover {
  color: #006cff;
}

.footer-info {
  color: #b6bcc4;
  line-height: 1.7;
}

.footer-info a {
  color: #b6bcc4;
}

.footer-info a:hover {
  color: #8a9099;
}

.admin-body {
  min-height: 100vh;
  display: flex;
  background: #f7f8fa;
  letter-spacing: 0;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  width: 220px;
  min-height: 100vh;
  height: 100vh;
  overflow-y: auto;
  padding: 28px 22px;
  background: #fff;
  border-right: 1px solid #e6e6e6;
}

.admin-sidebar a {
  display: block;
  padding: 11px 8px;
  border-radius: 4px;
  color: #5f6368;
  font-size: 14px;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: #f3f6fb;
  color: #006cff;
}

.admin-brand {
  margin-bottom: 24px;
  font-size: 20px !important;
  font-weight: 700;
  color: #202124 !important;
}

.admin-logout {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eef0f2;
}

.admin-logout button {
  border: 0;
  background: transparent;
  color: #8a9099;
  cursor: pointer;
  font-size: 14px;
}

.admin-main {
  flex: 1;
  padding: 36px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.admin-header h1 {
  font-size: 26px;
}

.admin-header p {
  margin-top: 6px;
  color: #70757a;
  font-size: 14px;
}

.admin-button,
.login-card button {
  border: 0;
  border-radius: 4px;
  padding: 10px 16px;
  background: #006cff;
  color: #fff;
  cursor: pointer;
}

.secondary-button,
.admin-filters button,
.upload-form button {
  border: 1px solid #dfe2e5;
  border-radius: 4px;
  padding: 9px 13px;
  background: #fff;
  color: #202124;
  cursor: pointer;
  font-size: 14px;
}

.settings-form .admin-button {
  border: 0;
  background: #006cff;
  color: #fff;
}

.upload-form .admin-button {
  border: 0;
  background: #006cff;
  color: #fff;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.admin-stats a,
.admin-panel {
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  background: #fff;
}

.admin-stats a {
  display: block;
  padding: 16px;
  color: #202124;
}

.admin-stats a:hover {
  border-color: #cfd4da;
  background: #fbfcfd;
}

.admin-stats span {
  color: #8a9099;
  font-size: 13px;
}

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

.admin-panel {
  padding: 22px;
  margin-bottom: 22px;
}

.admin-panel h2 {
  margin-bottom: 16px;
  font-size: 18px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-title h2 {
  margin: 0;
}

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

.dashboard-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.dashboard-row span {
  color: #8a9099;
  font-size: 13px;
}

.dashboard-row strong {
  font-size: 14px;
}

.admin-filters {
  display: grid;
  grid-template-columns: 1fr 150px 170px auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.admin-filters input,
.admin-filters select {
  width: 100%;
  border: 1px solid #dfe2e5;
  border-radius: 4px;
  padding: 10px 12px;
  background: #fff;
  font-size: 14px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e6e6e6;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
  font-size: 14px;
}

.admin-table small {
  display: block;
  margin-top: 6px;
  color: #999fa7;
}

.admin-title-link {
  display: inline-block;
  color: #202124 !important;
}

.admin-title-link:hover {
  color: #006cff !important;
}

.admin-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.admin-row-tags span {
  color: #70757a;
  font-size: 12px;
}

.status-badge {
  display: inline-block;
  border-radius: 3px;
  padding: 3px 7px;
  font-size: 12px;
}

.status-badge.is-published {
  background: #eef5ff;
  color: #006cff;
}

.status-badge.is-draft {
  background: #f1f3f4;
  color: #5f6368;
}

.admin-table a {
  margin-right: 14px;
  color: #006cff;
}

.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
}

.admin-pagination a,
.admin-pagination span,
.admin-pagination em {
  min-width: 34px;
  border: 1px solid #dfe2e5;
  border-radius: 4px;
  padding: 8px 10px;
  background: #fff;
  color: #5f6368;
  text-align: center;
  font-size: 14px;
  font-style: normal;
}

.admin-pagination span {
  border-color: #202124;
  color: #202124;
  font-weight: 700;
}

.admin-pagination a:hover {
  border-color: #c7ccd1;
  color: #006cff;
}

.action-cell {
  white-space: nowrap;
}

.action-cell form {
  display: inline;
  margin-right: 14px;
}

.action-cell button {
  border: 0;
  background: transparent;
  color: #af0900;
  cursor: pointer;
  font-size: 14px;
  vertical-align: baseline;
}

.tag-row-form button {
  border: 1px solid #dfe2e5;
  border-radius: 4px;
  padding: 8px 12px;
  background: #fff;
  color: #202124;
  cursor: pointer;
  font-size: 14px;
}

.inline-form {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  padding: 22px;
}

.editor-form label,
.editor-form fieldset {
  display: block;
  margin-bottom: 16px;
  border: 0;
  color: #5e5e5e;
  font-size: 14px;
}

.editor-form input[type="text"],
.editor-form input[type="date"],
.editor-form input[type="time"],
.editor-form input[type="datetime-local"],
.editor-form input:not([type]),
.editor-form select,
.editor-form textarea,
.inline-form input,
.settings-form input,
.settings-form textarea,
.login-card input {
  width: 100%;
  margin-top: 7px;
  border: 1px solid #dfe2e5;
  border-radius: 4px;
  padding: 11px 12px;
  color: #2b2b2b;
  font-size: 15px;
}

.editor-header {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: -36px -36px 24px;
  padding: 22px 36px;
  border-bottom: 1px solid #e6e6e6;
  background: rgba(247, 248, 250, 0.96);
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.save-hint {
  color: #8a9099;
}

.editor-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
}

.editor-main,
.editor-side section {
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  padding: 22px;
  background: #fff;
}

.editor-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.editor-side h2 {
  margin-bottom: 14px;
  font-size: 17px;
}

.publish-datetime {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
  min-width: 0;
  margin-bottom: 16px;
}

.publish-datetime label {
  min-width: 0;
  margin-bottom: 0;
  overflow: hidden;
}

.publish-datetime input {
  display: block;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  height: 44px;
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  background-clip: padding-box;
  line-height: normal;
}

.editor-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
}

.editor-tabs button {
  border: 1px solid #dfe2e5;
  border-radius: 4px;
  padding: 7px 11px;
  background: #fff;
  cursor: pointer;
}

.editor-tabs button.active {
  border-color: #006cff;
  color: #006cff;
}

.editor-tabs span {
  margin-left: auto;
  color: #8a9099;
  font-size: 13px;
}

.editor-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 12px;
  color: #8a9099;
  font-size: 13px;
}

.inline-upload {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin: 0 !important;
  border: 1px solid #dfe2e5 !important;
  border-radius: 4px;
  padding: 8px 12px;
  background: #fff;
  color: #202124 !important;
  cursor: pointer;
}

.inline-upload input {
  display: none;
}

.autosave-status {
  margin-left: auto;
}

.content-label span {
  display: block;
  margin-bottom: 7px;
}

.markdown-preview {
  min-height: 520px;
  border: 1px solid #dfe2e5;
  border-radius: 4px;
  padding: 18px;
  background: #fff;
}

.editor-form textarea {
  resize: vertical;
  /* deslop-ignore-next-line 33: markdown editing benefits from monospace */
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  line-height: 1.55;
}

.tag-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
}

.tag-checks label,
.form-row label {
  margin: 0;
}

.tag-editor {
  display: grid;
  gap: 12px;
}

.tag-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #dfe2e5;
  border-radius: 4px;
  padding: 6px 8px 6px 10px;
  background: #fff;
  color: #202124;
  font-size: 13px;
}

.tag-chip button {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 3px;
  background: #f1f3f4;
  color: #70757a;
  cursor: pointer;
  line-height: 18px;
}

.tag-chip button:hover {
  background: #e8eaed;
  color: #202124;
}

.tag-add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.tag-add-row input {
  width: 100%;
  border: 1px solid #dfe2e5;
  border-radius: 4px;
  padding: 10px 12px;
}

.tag-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 2px;
}

.tag-suggestions button {
  border: 0;
  border-radius: 3px;
  padding: 5px 8px;
  background: #f1f3f4;
  color: #5f6368;
  cursor: pointer;
  font-size: 12px;
}

.tag-suggestions button:hover {
  background: #e8f0fe;
  color: #006cff;
}

.tag-suggestions button span {
  color: #9aa0a6;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 18px;
}

.form-row.compact {
  display: grid;
  gap: 10px;
  margin-bottom: 0;
}

.cover-preview {
  display: grid;
  place-items: center;
  min-height: 120px;
  margin: -4px 0 12px;
  border: 1px solid #dfe2e5;
  border-radius: 4px;
  background: #f8f9fa;
  overflow: hidden;
}

.cover-preview img {
  display: block;
  width: 100%;
  max-height: 190px;
  object-fit: cover;
}

.cover-preview span {
  color: #8a9099;
  font-size: 13px;
}

.cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.cover-actions .secondary-button {
  margin: 0;
  color: #8a3b30;
}

.cover-upload {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin-bottom: 0 !important;
  border: 1px solid #dfe2e5 !important;
  border-radius: 4px;
  padding: 9px 12px;
  background: #fff;
  color: #202124 !important;
  cursor: pointer;
}

.cover-upload input {
  display: none;
}

.cover-status {
  min-height: 18px;
  margin: 0 0 14px;
  color: #8a9099;
  font-size: 13px;
}

.inline-form {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.inline-form input {
  margin: 0;
}

.tag-row-form {
  display: grid;
  grid-template-columns: minmax(150px, 240px) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.tag-row-form input {
  width: 100%;
  border: 1px solid #dfe2e5;
  border-radius: 4px;
  padding: 8px 10px;
}

.tag-row-form span {
  color: #999fa7;
  font-size: 13px;
}

.upload-form {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  padding: 18px;
  background: #fff;
}

.backup-panel form {
  margin-top: 18px;
}

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

.backup-grid div {
  border: 1px solid #eef0f2;
  border-radius: 4px;
  padding: 16px;
  background: #fbfcfd;
}

.backup-grid span {
  display: block;
  color: #8a9099;
  font-size: 13px;
}

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

.memo-compose .panel-title span {
  color: #8a9099;
  font-size: 13px;
}

.memo-compose {
  max-width: 920px;
}

.memo-view-mobile {
  display: none;
}

.memo-admin-list {
  display: grid;
  max-width: 920px;
  gap: 10px;
}

.memo-admin-item {
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.memo-admin-item summary {
  display: block;
  cursor: pointer;
  list-style: none;
}

.memo-admin-item summary::-webkit-details-marker {
  display: none;
}

.memo-admin-summary {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
}

.memo-admin-summary time {
  color: #8a9099;
  font-size: 13px;
}

.memo-admin-summary p {
  overflow: hidden;
  color: #202124;
  font-size: 15px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memo-admin-summary > div {
  display: flex;
  gap: 6px;
  align-items: center;
}

.memo-admin-item[open] .memo-admin-summary {
  border-bottom: 1px solid #eef0f2;
  background: #fbfcfd;
}

.memo-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
  margin-bottom: 12px;
}

.memo-admin-head > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.memo-admin-head strong {
  font-size: 14px;
}

.memo-admin-head span {
  color: #8a9099;
  font-size: 13px;
}

.memo-admin-head form {
  margin: 0;
}

.memo-admin-head .danger-button {
  border: 1px solid #f0d5d2;
  border-radius: 4px;
  padding: 8px 10px;
  background: #fff;
  color: #af0900;
  cursor: pointer;
}

.memo-editor textarea {
  width: 100%;
  border: 1px solid #dfe2e5;
  border-radius: 4px;
  padding: 12px;
  color: #2b2b2b;
  font-size: 15px;
  line-height: 1.65;
  resize: vertical;
}

.memo-editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.memo-editor-top span {
  color: #8a9099;
  font-size: 13px;
}

.memo-editor-top .admin-button {
  min-height: 38px;
  padding: 8px 14px;
}

.memo-admin-item .memo-editor {
  padding: 0 18px 18px;
}

.memo-editor-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin: 10px 0 12px;
  color: #8a9099;
  font-size: 13px;
}

.memo-datetime {
  display: block;
  width: 240px;
  max-width: 240px;
  margin-bottom: 0;
}

.memo-datetime label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  color: #5f6368;
  font-size: 14px;
}

.memo-datetime input[type="date"] {
  width: 100%;
  min-width: 180px;
  margin-top: 0;
  padding-right: 10px;
}

.memo-editor-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.memo-editor-foot label {
  margin: 0;
  color: #5f6368;
  font-size: 14px;
}

.memo-editor-foot > label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
}

.memo-editor-foot select {
  border: 1px solid #dfe2e5;
  border-radius: 4px;
  min-height: 44px;
  height: 44px;
  padding: 9px 12px;
  background: #fff;
  color: #202124;
  font-size: 14px;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.asset-card {
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}

.asset-card img {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 3px;
  background: #f1f3f4;
}

.asset-card > div {
  margin: 10px 0;
}

.asset-card strong,
.asset-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-card strong {
  font-size: 13px;
}

.asset-card span {
  margin-top: 4px;
  color: #8a9099;
  font-size: 12px;
}

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

.asset-actions form {
  margin: 0;
}

.asset-card button {
  width: 100%;
  border: 1px solid #dfe2e5;
  border-radius: 4px;
  padding: 8px 10px;
  background: #fff;
  cursor: pointer;
}

.asset-card .danger-button {
  border-color: #f0d5d2;
  color: #af0900;
}

.asset-card .danger-button:hover {
  background: #fff3f1;
}

.has-modal {
  overflow: hidden;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(32, 33, 36, 0.36);
}

.confirm-modal.is-open {
  display: grid;
}

.confirm-dialog {
  width: min(420px, 100%);
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(32, 33, 36, 0.18);
}

.confirm-dialog h2 {
  margin-bottom: 10px;
  font-size: 20px;
}

.confirm-dialog p {
  color: #5f6368;
  font-size: 15px;
  line-height: 1.7;
}

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

.confirm-actions button {
  min-height: 40px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
}

.confirm-actions .danger-button {
  border: 0;
  background: #af0900;
  color: #fff;
}

.confirm-actions .danger-button:hover {
  background: #970800;
}

.settings-form {
  max-width: 760px;
}

.settings-form label {
  display: block;
  margin-bottom: 16px;
  color: #5e5e5e;
  font-size: 14px;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f7f8fa;
  color: #202124;
  letter-spacing: 0;
}

.login-shell {
  width: min(420px, 100%);
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(32, 33, 36, 0.08);
}

.login-card {
  display: flex;
  flex-direction: column;
  padding: 30px;
  background: #fff;
}

.login-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.login-card-head a {
  color: #202124;
  font-size: 18px;
  font-weight: 700;
}

.login-card-head span {
  border: 1px solid #e6e6e6;
  border-radius: 3px;
  padding: 4px 7px;
  background: #f7f8fa;
  color: #8a9099;
  font-size: 12px;
}

.login-card h1 {
  margin-bottom: 20px;
  font-size: 24px;
}

.login-card label {
  display: block;
  color: #5f6368;
  font-size: 14px;
}

.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-top: 8px;
  border: 1px solid #dfe2e5;
  border-radius: 4px;
  background: #fff;
}

.password-field:focus-within {
  border-color: #006cff;
  box-shadow: 0 0 0 3px rgba(0, 108, 255, 0.1);
}

.password-field input {
  margin: 0;
  border: 0;
  outline: 0;
  box-shadow: none;
}

.password-field button {
  border: 0;
  border-left: 1px solid #edf0f2;
  padding: 0 12px;
  height: 28px;
  background: transparent;
  color: #70757a;
  cursor: pointer;
}

.login-submit {
  width: 100%;
  margin-top: 16px;
  padding: 12px 16px;
  font-size: 15px;
  background: #202124;
}

.login-submit:hover {
  background: #3c4043;
}

.login-error {
  margin: -4px 0 16px;
  border-radius: 4px;
  padding: 10px 12px;
  background: #fff3f1;
  color: #a13b31;
  font-size: 14px;
}

@media (max-width: 992px) {
  .site-header {
    padding: 36px 24px 18px;
  }

  .avatar {
    width: 58px;
    height: 58px;
  }

  .site-title {
    font-size: 24px;
  }

  .menu {
    margin: 0 9px;
  }

  .post-inner {
    margin-top: 16px;
  }

  .post-card {
    margin: 12px 16px;
    padding: 18px 22px;
  }

  .post-card .post-title {
    font-size: 17px;
    font-weight: 700;
  }

  .post-abstract,
  .post-info {
    margin-top: 10px;
  }

  .post-feature-image {
    display: none;
  }

  .post-detail {
    width: 100%;
    max-width: 100%;
    margin-top: 20px;
    padding: 24px 32px;
  }

  .post-detail > .post-title {
    font-size: 20px;
    font-weight: 700;
  }

  .gt-post-content img {
    max-width: 100%;
    max-height: none;
    margin: 18px auto;
  }

  .post-nav {
    width: 100%;
    max-width: calc(100% - 32px);
    grid-template-columns: 1fr;
  }

  .post-nav-next {
    text-align: left;
  }

  .post-nav-spacer {
    display: none;
  }

  .archive-item {
    display: block;
  }

  .archive-item span {
    display: block;
    margin-bottom: 6px;
  }

  .memos-container {
    max-width: 480px;
    padding: 0 26px;
  }

  .memo-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px 0;
  }

  .memo-date {
    padding-top: 0;
  }

  .admin-body {
    display: block;
  }

  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    min-height: 0;
    height: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid #e6e6e6;
    -webkit-overflow-scrolling: touch;
  }

  .admin-sidebar a {
    flex: 0 0 auto;
    padding: 9px 10px;
    white-space: nowrap;
  }

  .admin-brand {
    margin: 0 8px 0 0;
    font-size: 16px !important;
  }

  .admin-logout {
    flex: 0 0 auto;
    margin: 0 0 0 4px;
    padding: 0 0 0 10px;
    border-top: 0;
    border-left: 1px solid #eef0f2;
  }

  .admin-main {
    padding: 22px 16px;
  }

  .admin-stats,
  .admin-filters,
  .editor-shell,
  .dashboard-row,
  .backup-grid {
    grid-template-columns: 1fr;
  }

  .editor-header {
    position: static;
    margin: -22px -16px 18px;
    padding: 18px 16px;
  }

  .editor-actions,
  .upload-form {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-header,
  .form-row,
  .inline-form,
  .action-cell,
  .tag-row-form {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-header {
    gap: 14px;
  }

  .admin-header .admin-button,
  .editor-actions .admin-button {
    width: 100%;
    text-align: center;
  }

  .tag-row-form {
    display: flex;
  }

  .admin-table {
    border: 0;
    background: transparent;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table tr {
    margin-bottom: 12px;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
  }

  .admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
  }

  .admin-table td:last-child {
    border-bottom: 0;
  }

  .admin-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: #8a9099;
    font-size: 12px;
  }

  .admin-table td[data-label="标题"]::before,
  .admin-table td[data-label="标签"]::before {
    display: none;
  }

  .action-cell {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 14px;
    white-space: normal;
  }

  .action-cell a,
  .action-cell form {
    margin-right: 0;
  }

  .editor-main,
  .editor-side section,
  .admin-panel,
  .inline-form,
  .upload-form {
    padding: 18px;
  }

  .memo-admin-summary {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 10px 11px;
  }

  .memo-admin-summary p {
    white-space: normal;
  }

  .memo-admin-head {
    padding: 10px 11px 0;
    margin-bottom: 7px;
  }

  .memo-admin-item .memo-editor {
    padding: 0 11px 11px;
  }

  .admin-pagination {
    margin-top: 14px;
  }

  .markdown-preview {
    min-height: 360px;
  }

  .asset-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .upload-form input {
    width: 100%;
  }

  .settings-form {
    max-width: none;
  }

  .login-body {
    padding: 18px;
  }

  .login-shell {
    width: min(420px, 100%);
  }

  .login-card {
    padding: 28px;
  }
}

@media (max-width: 640px) {
  .admin-body {
    font-size: 16px;
  }

  .admin-main {
    padding: 18px 12px;
  }

  .admin-header h1 {
    font-size: 22px;
  }

  .admin-header p {
    font-size: 15px;
    line-height: 1.6;
  }

  .admin-sidebar a,
  .admin-logout button {
    font-size: 15px;
  }

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

  .admin-stats a {
    padding: 15px;
  }

  .admin-stats span {
    font-size: 14px;
  }

  .admin-stats strong {
    font-size: 26px;
  }

  .admin-filters {
    gap: 8px;
  }

  .admin-filters input,
  .admin-filters select,
  .editor-form input[type="text"],
  .editor-form input[type="date"],
  .editor-form input[type="time"],
  .editor-form input[type="datetime-local"],
  .editor-form input:not([type]),
  .editor-form select,
  .editor-form textarea,
  .inline-form input,
  .settings-form input,
  .settings-form textarea,
  .tag-add-row input,
  .tag-row-form input {
    min-height: 44px;
    font-size: 16px;
  }

  .admin-filters button,
  .admin-filters a,
  .inline-form button,
  .upload-form button,
  .upload-form input,
  .tag-row-form button,
  .settings-form .admin-button {
    min-height: 44px;
    font-size: 16px;
    width: 100%;
    text-align: center;
  }

  .admin-table td {
    font-size: 15px;
  }

  .admin-table td[data-label]::before,
  .admin-table small,
  .admin-row-tags span,
  .status-badge,
  .tag-suggestions button,
  .asset-card strong,
  .asset-card span {
    font-size: 14px;
  }

  .admin-title-link strong {
    font-size: 17px;
    line-height: 1.45;
  }

  .dashboard-row {
    gap: 5px;
    padding: 12px 0;
  }

  .dashboard-row strong {
    font-size: 16px;
  }

  .dashboard-row span {
    font-size: 14px;
  }

  .dashboard-row .status-badge {
    width: fit-content;
  }

  .editor-header {
    margin: -18px -12px 14px;
    padding: 14px 12px;
  }

  .editor-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .editor-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid #dfe2e5;
    border-radius: 4px;
    background: #fff;
    color: #3c4043;
    font-size: 15px;
    text-align: center;
  }

  .editor-actions .admin-button {
    grid-column: 1 / -1;
    min-height: 44px;
    width: 100%;
    margin-top: 2px;
    font-size: 16px;
    text-align: center;
  }

  .editor-main,
  .editor-side section {
    padding: 14px;
  }

  .editor-tabs {
    flex-wrap: wrap;
  }

  .editor-tabs button {
    min-height: 40px;
    font-size: 15px;
  }

  .editor-tabs span {
    flex-basis: 100%;
    margin-left: 0;
    font-size: 14px;
  }

  .editor-tools {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    font-size: 14px;
  }

  .inline-upload,
  .editor-tools .secondary-button {
    width: 100%;
    min-height: 42px;
  }

  .autosave-status {
    margin-left: 0;
  }

  .content-label textarea {
    min-height: 430px;
  }

  .tag-add-row,
  .publish-datetime,
  .cover-actions,
  .memo-editor-foot {
    grid-template-columns: 1fr;
  }

  .publish-datetime,
  .publish-datetime label,
  .publish-datetime input {
    max-width: 100%;
  }

  .cover-actions {
    display: grid;
  }

  .cover-upload,
  .cover-actions .secondary-button {
    width: 100%;
  }

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

  .asset-card {
    min-width: 0;
    padding: 12px;
  }

  .asset-card img {
    height: auto;
    max-height: 150px;
    aspect-ratio: 1 / 1;
  }

  .asset-card > div {
    margin: 12px 0;
  }

  .asset-card strong {
    font-size: 16px;
  }

  .asset-card span {
    font-size: 14px;
  }

  .asset-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .asset-card button {
    min-height: 42px;
    padding: 9px 8px;
    font-size: 15px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .backup-grid div {
    padding: 15px;
  }

  .memo-admin-head,
  .memo-editor-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .memo-admin-title .memo-view-desktop {
    display: none;
  }

  .memo-view-mobile {
    display: inline-block;
    margin-top: 6px;
    color: #006cff;
    font-size: 14px;
  }

  .memo-editor-tools {
    gap: 6px;
    margin: 7px 0 9px;
  }

  .memo-editor-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 7px;
    align-items: end;
    margin: 0;
    padding: 0;
    border-top: 0;
    background: transparent;
  }

  .memo-admin-head .danger-button,
  .memo-editor-tools .inline-upload {
    width: 100%;
    min-height: 38px;
  }

  .memo-datetime {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
  }

  .memo-datetime label {
    margin-bottom: 0;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .memo-datetime input[type="date"] {
    min-width: 0;
    min-height: 38px;
    height: 38px;
    margin-top: 0;
    padding: 8px 9px;
    font-size: 15px;
  }

  .memo-editor-foot > label {
    grid-column: 2;
    grid-row: 2;
    justify-content: center;
    min-height: 36px;
    font-size: 14px;
  }

  .memo-editor-foot select {
    width: 100%;
    min-height: 38px;
    height: 38px;
    padding: 8px 9px;
  }

  .memo-editor-foot .admin-button {
    width: auto;
  }

  .memo-editor-top {
    margin-bottom: 8px;
  }

  .memo-editor-top span {
    font-size: 13px;
  }

  .memo-editor-top .admin-button {
    min-height: 36px;
    padding: 7px 14px;
  }

  .memo-editor textarea {
    height: 196px;
    min-height: 169px;
    font-size: 16px;
    line-height: 1.5;
  }
}

@media (max-width: 480px) {
  .login-body {
    align-items: start;
    padding: 18px 14px;
  }

  .login-shell {
    margin-top: 42px;
    border-radius: 6px;
    box-shadow: none;
  }

  .login-card {
    padding: 22px;
  }

  .login-card-head {
    margin-bottom: 18px;
  }

  .login-card h1 {
    margin-bottom: 18px;
    font-size: 22px;
  }

  .password-field input {
    min-height: 44px;
  }

  .password-field button {
    height: 32px;
    padding: 0 11px;
  }

  .login-submit {
    min-height: 44px;
  }

  .asset-card img {
    aspect-ratio: 1 / 1;
    max-height: 140px;
  }
}
