:root {
  --bg: #fff;
  --text: #0f172a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --brand: #111827;
  --primary: #2563eb;
  --radius: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans", sans-serif;
}
.topbar {
  height: 56px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav {
  width: 100%;
  max-width: 1200px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-left {
  display: flex;
  gap: 18px;
}
.nav-item {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
}
.nav-item:hover {
  color: #111827;
}
.hero {
  height: 280px;
  position: relative;
  overflow: hidden;
}
.hero--compact {
  height: 220px;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-saturated img {
  filter: saturate(110%);
}
.hero .mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55));
}
.hero .text {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  text-align: center;
  color: #111827;
}
.hero .title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}
.hero .sub {
  font-size: 14px;
  color: #6b7280;
  margin-top: 6px;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
}
.card .inner {
  padding: 18px;
}
.card-spaced {
  margin-top: 16px;
}
.card-spaced-sm {
  margin-top: 12px;
}
.section-title {
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}
.section-title-tight {
  margin-bottom: 0;
}
.section-title-sm {
  margin-bottom: 6px;
}
.panes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.pane.span-2 {
  grid-column: 1 / -1;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.card-title {
  font-weight: 700;
  color: #111827;
  letter-spacing: 0.2px;
}
.more-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #111827;
  text-decoration: none;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, opacity 0.12s ease-out;
  flex-shrink: 0;
}
.more-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
  opacity: 0.95;
}
.more-btn:active {
  transform: translateY(0);
  opacity: 0.9;
}
.list {
  display: grid;
  gap: 10px;
}
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, border-color 0.12s ease-out;
}
.list-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.08);
  border-color: rgba(15, 23, 42, 0.15);
}
.item-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.item-title {
  font-size: 15px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-sub {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-meta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #475569;
}
.meta-right {
  cursor: pointer;
  transition: transform 0.12s ease-out, opacity 0.12s ease-out;
  user-select: none;
}
.meta-right:hover {
  transform: translateY(-1px) scale(1.04);
  opacity: 0.9;
}
.pill {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
  color: #334155;
  font-size: 12px;
  line-height: 1.7;
}
.heart {
  color: hsl(0, 100%, 65%);
  font-size: 12px;
}
.sidebar .about {
  display: flex;
  gap: 12px;
}
.about-text {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
}
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.tag {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(2, 132, 199, 0.08);
  color: #0f172a;
  font-size: 12px;
  line-height: 1;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
  z-index: 100;
  max-width: calc(100vw - 24px);
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}
.post-list,
.product-list {
  display: grid;
  gap: 16px;
}
.post {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.post a {
  color: inherit;
  text-decoration: none;
}
.post .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post .content {
  padding: 14px;
}
.post .title {
  font-size: 20px;
  font-weight: 700;
  margin: 4px 0 6px;
}
.post .meta {
  font-size: 10px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.post .meta-left {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post .meta-right {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.12s ease-out, opacity 0.12s ease-out;
}
.post .like-icon {
  font-size: 12px;
  color: hsl(0, 100%, 65%);
  transition: transform 0.12s ease-out, color 0.12s ease-out;
}
.post .meta-right:hover {
  transform: translateY(-1px) scale(1.04);
  opacity: 0.9;
}
.post .meta-right:hover .like-icon {
  color: hsl(0, 100%, 55%);
}
.post .excerpt {
  color: #374151;
  font-size: 14px;
  margin-top: 8px;
}
.page-blog-detail .title {
  font-size: 28px;
  font-weight: 800;
  margin: 6px 0;
}
.page-blog-detail .description {
  color: #64748b;
  font-size: 16px;
  line-height: 1.6;
  margin: 10px 0 14px;
  padding: 12px 16px;
  background: #f9fafb;
  border-left: 3px solid #3b82f6;
  border-radius: 6px;
}
.page-blog-detail .meta {
  color: #64748b;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.page-blog-detail .meta-left {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-blog-detail .meta-right {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.12s ease-out, opacity 0.12s ease-out;
}
.page-blog-detail .like-icon {
  font-size: 12px;
  color: hsl(0, 100%, 65%);
  transition: transform 0.12s ease-out, color 0.12s ease-out;
}
.page-blog-detail .meta-right:hover {
  transform: translateY(-1px) scale(1.04);
  opacity: 0.9;
}
.page-blog-detail .meta-right:hover .like-icon {
  color: hsl(0, 100%, 55%);
}
.post .like-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.post .product-thumb {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: #f9fafb;
}
.type-cloud {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.type-tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #111827;
  cursor: pointer;
  user-select: none;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, opacity 0.12s ease-out;
  line-height: 1.2;
  text-decoration: none;
}
.type-tag.type-color-0 {
  background: #fee2e2;
}
.type-tag.type-color-1 {
  background: #dbeafe;
}
.type-tag.type-color-2 {
  background: #dcfce7;
}
.type-tag.type-color-3 {
  background: #fef3c7;
}
.type-tag.type-color-4 {
  background: #e0e7ff;
}
.type-tag.type-color-5 {
  background: #fce7f3;
}
.type-tag.active {
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.3);
  opacity: 0.95;
  background: #111827;
  color: #fff;
}
.type-tag:hover {
  transform: translateY(-1px) scale(1.04);
  opacity: 0.9;
}
.section-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.filter-form {
  display: flex;
  align-items: center;
}
.filter-input {
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  width: 200px;
}
.filter-button {
  margin-left: 8px;
  padding: 6px 12px;
  background: #111827;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.pager {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.page-info {
  font-size: 13px;
  color: #6b7280;
}
.top-liked {
  font-size: 13px;
  color: #4b5563;
}
.top-liked-item {
  margin: 6px 0;
}
.empty-text {
  color: #6b7280;
  font-size: 14px;
}
.empty-text-sm {
  font-size: 13px;
}
.markdown-body {
  line-height: 1.85;
  font-size: 16px;
  color: #0f172a;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  margin: 18px 0 10px;
}
.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body pre,
.markdown-body blockquote {
  margin: 14px 0;
}
.markdown-body blockquote {
  padding: 10px 12px;
  border-left: 4px solid #93c5fd;
  background: #f0f9ff;
  border-radius: 8px;
}
.download-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
}
.download-fab::before {
  content: "";
  position: absolute;
  right: -6px;
  bottom: 52px;
  width: 200px;
  height: 18px;
  background: transparent;
}
.download-btn {
  width: 90px;
  height: 52px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #84aef1, #8be5f3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.35), 0 6px 14px rgba(15, 23, 42, 0.14);
  user-select: none;
  cursor: pointer;
}
.download-menu {
  position: absolute;
  right: 0;
  bottom: 60px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  min-width: 168px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.14);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.12s ease-out, transform 0.12s ease-out;
}
.download-fab:hover .download-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.download-item {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #111827;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.12s ease-out, transform 0.12s ease-out;
}
.download-item:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}
.product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.product-info {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.product-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: #f9fafb;
}
.product-basic {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.product-title {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.product-subtitle {
  font-size: 14px;
  color: #6b7280;
}
.product-meta {
  font-size: 13px;
  color: #4b5563;
}
.product-download {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.download-btn-main,
.download-btn-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, opacity 0.12s ease-out;
}
.download-btn-main {
  background: #4161a3;
  color: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}
.download-btn-sub {
  background: #77cf94;
  color: #111827;
}
.download-btn-main:hover,
.download-btn-sub:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}
.download-btn-disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}
.download-tips {
  font-size: 12px;
  color: #9ca3af;
  text-align: right;
}
.is-hidden {
  display: none;
}
.editor-preview {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  background: #f8fafc;
  min-height: 260px;
}
.editor-toolbar button {
  color: #6b7280;
}
.editor-toolbar button:hover {
  background: #e5e7eb;
}
.editor-toolbar button svg {
  fill: currentColor !important;
  stroke: currentColor !important;
}
.editor-toolbar button svg * {
  fill: currentColor !important;
  stroke: currentColor !important;
}
#edit-component {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
  min-height: 520px;
}
#edit-component.edit-component-full {
  height: calc(100vh - 360px);
}
#edit-component.edit-component-fixed {
  height: 540px;
}
#edit-component #edit-preview {
  grid-column: 2;
}
#edit-component #edit-input {
  display: none;
}
#edit-component > .EasyMDEContainer {
  grid-column: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#edit-component > #edit-preview {
  min-width: 0;
  height: 100%;
  overflow: auto;
}
#edit-component > .EasyMDEContainer .editor-toolbar {
  flex: 0 0 auto;
}
#edit-component > .EasyMDEContainer .editor-statusbar {
  flex: 0 0 auto;
}
#edit-component > .EasyMDEContainer .CodeMirror {
  flex: 1 1 auto;
  height: 100% !important;
  min-height: 0;
}
#edit-component > .EasyMDEContainer .CodeMirror-scroll {
  height: 100% !important;
  max-height: 100% !important;
  overflow: auto !important;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 120px 80px 120px;
  gap: 10px;
  margin: 14px 0;
}
.form-row-desc {
  margin: 5px 0 15px;
}
.form-row-desc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.input,
.select {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 10px;
}
.submit-btn {
  position: relative;
  top: -5px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #111827;
  color: #fff;
  cursor: pointer;
}
.submit-btn:hover {
  background: #0f172a;
}
.status {
  color: #64748b;
  font-size: 14px;
  margin-top: 8px;
}
.status-sm {
  font-size: 13px;
  color: #6b7280;
  margin-top: 6px;
  min-height: 18px;
}
.site-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 18px 16px;
  margin-top: 24px;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
}
.footer-link {
  color: inherit;
  text-decoration: none;
  margin: 0 10px;
}
.footer-row {
  margin-top: 10px;
  font-size: 12px;
}
.record-link {
  color: inherit;
  text-decoration: none;
  margin-right: 10px;
}
.record-icon {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  vertical-align: -3px;
}
.error-page {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f3f4f6;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  color: #1f2937;
}
.error-container {
  text-align: center;
  padding: 2rem;
}
.error-title {
  font-size: 6rem;
  margin: 0;
  color: #3b82f6;
}
.error-subtitle {
  font-size: 1.5rem;
  margin: 1rem 0;
  color: #374151;
}
.error-text {
  color: #6b7280;
  margin-bottom: 2rem;
}
.error-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #3b82f6;
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
}
.error-btn:hover {
  background-color: #2563eb;
}
@media (max-width: 960px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .hero {
    height: 220px;
  }
  .panes {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 980px) {
  #edit-component {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }
  #edit-component #edit-preview {
    grid-column: 1;
    height: auto;
  }
  #edit-component > .EasyMDEContainer {
    height: auto;
  }
}
@media (max-width: 768px) {
  .product-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .product-download {
    align-items: flex-start;
    width: 100%;
  }
  .product-download .download-btn-main,
  .product-download .download-btn-sub {
    width: 100%;
    justify-content: center;
  }
  .download-tips {
    text-align: left;
  }
}
