/* 铅笔资料网 · 白底蓝字极简样式 */
:root {
  --blue: #0000cc;
  --blue-dark: #000099;
  --blue-soft: #eef0ff;
  --blue-line: #c9cdf5;
  --red: #990000;
  --ink: #0f172a;
  --muted: #667085;
  --line: #e6eaf2;
  --danger: #b42318;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background: #dbe7ff;
  color: var(--ink);
}

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── 顶栏 ─────────────────────────────── */
.site-head {
  background: #fff;
}

.head-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 34px 0 10px;
}

.head-center {
  justify-content: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.01em;
  flex: 0 0 auto;
}

.brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
}

.mark {
  --cell: clamp(26px, 9vw, 38px);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.mark-row {
  display: flex;
  align-items: baseline;
}

.mark-chars span {
  width: var(--cell);
  text-align: center;
  font-family: "QBName", var(--font);
  font-size: calc(var(--cell) * 0.92);
  font-weight: 400;
  color: var(--red);
  line-height: 1.2;
}

.mark-letters {
  margin-top: 2px;
}

.mark-letters span {
  width: var(--cell);
  text-align: center;
  font-size: calc(var(--cell) * 0.55);
  font-weight: 500;
  color: var(--red);
}

.mark-letters .tld {
  color: var(--blue);
}

.badge-admin {
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 4px 8px;
  border-radius: 999px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-size: 15px;
}

.nav a {
  color: var(--muted);
}

.nav a:hover {
  color: var(--blue);
  text-decoration: none;
}

.nav a.on {
  color: var(--blue);
  font-weight: 600;
}

.main {
  flex: 1;
  padding-top: 34px;
  padding-bottom: 64px;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 6.2vw, 34px);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 650;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.store-note {
  margin: 14px 0 0;
  max-width: 680px;
  color: var(--red);
  font-size: 15px;
  line-height: 1.95;
}

.page-head {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.crumb {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
}

.crumb a {
  color: var(--muted);
}

.crumb a:hover {
  color: var(--blue);
  text-decoration: none;
}

.crumb span {
  margin: 0 6px;
  color: #c3cad8;
}

/* ── 首页栏目入口 ─────────────────────── */
.home-main {
  display: block;
  padding-top: 18px;
}

.entries {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.entries a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 18px;
  margin: 0;
  border-radius: 16px;
  color: var(--blue);
  font-size: clamp(22px, 5.4vw, 26px);
  font-weight: 400;
  letter-spacing: 0.04em;
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease,
    transform 0.18s ease;
}

.entries a:hover {
  color: var(--blue-dark);
  text-decoration: none;
  background: #f7fbff;
  box-shadow: 0 12px 30px rgba(0, 0, 204, 0.16), 0 2px 6px rgba(0, 0, 204, 0.07);
  transform: translateY(-2px);
}

.entries a:focus-visible {
  outline: 2px solid #9999ff;
  outline-offset: 2px;
}

/* ── 分类列表 ─────────────────────────── */
.cat-list,
.post-list,
.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cat-list li + li {
  border-top: 1px solid var(--line);
}

.cat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 2px;
  color: var(--ink);
  min-height: 56px;
}

.cat-row:hover {
  color: var(--blue);
  text-decoration: none;
}

.cat-name {
  font-size: 17px;
  font-weight: 600;
}

.cat-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.chev {
  color: #b6bfd0;
  font-size: 20px;
  line-height: 1;
}

/* ── 文章列表 / 正文 ──────────────────── */
.post-list {
  margin-top: 6px;
}

.post-list li {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.post-list li:last-child {
  border-bottom: 0;
}

.post-title {
  display: inline-block;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.post-title:hover {
  color: var(--blue);
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.post-meta a {
  color: var(--muted);
}

.post-meta a:hover {
  color: var(--blue);
}

.dot {
  color: #c3cad8;
}

.article {
  max-width: 720px;
}

.article .page-head {
  padding-bottom: 12px;
  border-bottom: 0;
}

.article .body {
  margin: 8px 0 32px;
  overflow-wrap: anywhere;
  font-size: 16.5px;
}

.body p {
  margin: 0 0 16px;
}

.body img {
  display: block;
  margin: 18px 0;
  border-radius: 10px;
}

.body a {
  word-break: break-all;
}

.back {
  margin: 0;
  font-size: 14px;
}

.empty {
  margin: 0;
  padding: 18px 0;
  color: var(--muted);
  font-size: 14px;
}

/* ── 商店占位 / 定制页 ────────────────── */
.placeholder {
  margin-top: 26px;
  padding: 28px 22px;
  border: 1px dashed var(--blue-line);
  border-radius: var(--radius);
  background: #fbfcff;
  color: var(--muted);
  text-align: center;
}

.placeholder p {
  margin: 0 0 8px;
}

.placeholder p:last-child {
  margin-bottom: 0;
}

.shop-entry {
  margin-top: 34px;
  text-align: center;
}

.btn-shop {
  min-height: 48px;
  padding: 12px 26px;
  font-size: 16px;
}

.shop-hint {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.ph-title {
  margin-bottom: 10px !important;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}

.copy p {
  margin: 0 0 16px;
}

.steps,
.price,
.contact {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.steps ol {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.steps li {
  margin: 6px 0;
}

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

.contact p {
  margin: 0 0 16px;
}

/* ── 按钮 ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--blue);
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  text-align: center;
}

.btn:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
  text-decoration: none;
}

.btn-ghost {
  background: #fff;
  border-color: var(--blue-line);
  color: var(--blue);
}

.btn-ghost:hover {
  background: var(--blue-soft);
  border-color: var(--blue-line);
  color: var(--blue);
}

.btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.danger {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid #f0c2bd;
  border-radius: 9px;
  background: #fff;
  color: var(--danger);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.danger:hover {
  background: #fef3f2;
}

.linkbtn {
  padding: 3px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
}

.linkbtn:hover {
  color: var(--blue);
}

.inline {
  display: inline;
  margin: 0;
}

.offer {
  margin: 26px 0 0;
  font-size: 17px;
  line-height: 1.8;
}

.custom-note {
  max-width: 440px;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
  text-align: center;
}

.custom-note a {
  color: var(--blue);
}

/* ── 页脚 ─────────────────────────────── */
.site-foot {
  padding: 26px 0 36px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.site-foot p {
  margin: 2px 0;
}

.site-foot a {
  color: var(--muted);
}

.site-foot .icp a:hover {
  color: var(--blue);
}

/* ── 后台 ─────────────────────────────── */
.admin-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  padding-top: 16px;
  font-size: 13px;
}

.admin-bar a {
  color: var(--muted);
}

.admin-bar a:hover {
  color: var(--blue);
}

.admin-body .main {
  padding-top: 12px;
}

.panel {
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.panel-head h2 {
  margin: 0;
  font-size: 17px;
}

.admin-list li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.admin-list li:first-child {
  border-top: 0;
}

.admin-name {
  flex: 1 1 220px;
  min-width: 0;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

a.admin-name:hover {
  color: var(--blue);
}

.admin-meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

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

.admin-list form {
  margin: 0;
}

.alert {
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
}

.alert-ok {
  border: 1px solid #b7ebc6;
  background: #ecfdf3;
  color: #067647;
}

.alert-err {
  border: 1px solid #f3c9c4;
  background: #fef3f2;
  color: var(--danger);
}

.form label {
  display: block;
  margin: 16px 0 7px;
  font-size: 14px;
  font-weight: 600;
}

.form input[type="text"],
.form input[type="password"],
.form input[type="date"],
.form select,
.form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #cfd8e6;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
}

.form textarea {
  min-height: 260px;
  line-height: 1.7;
  resize: vertical;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid #9999ff;
  outline-offset: 1px;
  border-color: var(--blue);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.upload-row input[type="file"] {
  max-width: 100%;
  font-size: 13px;
}

.auth {
  max-width: 380px;
  margin: 36px auto 60px;
}

.auth h1 {
  margin: 0 0 6px;
  font-size: 24px;
}

.auth .muted {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.auth-form label {
  display: block;
  margin: 0 0 7px;
  font-size: 14px;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #cfd8e6;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
}

.auth-form input:focus {
  outline: 2px solid #9999ff;
  border-color: var(--blue);
}

.auth-min {
  max-width: 320px;
  margin: 22vh auto 0;
}

.auth-min .auth-form input {
  margin-bottom: 0;
  text-align: center;
}

.auth-submit {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ── 手机适配 ─────────────────────────── */
@media (max-width: 640px) {
  .wrap {
    padding: 0 18px;
  }

  .head-inner {
    gap: 6px 14px;
  }

  .brand {
    font-size: 16px;
  }

  .nav {
    gap: 15px;
    font-size: 14px;
  }

  .main {
    padding-top: 24px;
    padding-bottom: 48px;
  }

  h1 {
    font-size: clamp(24px, 7vw, 30px);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .admin-name {
    flex: 1 1 100%;
  }

  .article .body {
    font-size: 16px;
  }
}

@media (max-width: 360px) {

  .nav {
    gap: 12px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cat-row,
  .entries a {
    transition: none;
  }
}


/* 站名字体：站酷小薇体（SIL OFL 1.1，授权见 /static/qbname-OFL.txt），只子集了站名五个字 */
@font-face {
  font-family: "QBName";
  src: url("/static/qbname.woff2?v=13") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@media (min-width: 700px) {
  .mark {
    --cell: 44px;
  }
}
/* 首页整组居中 */
.home-page .site-head {
  display: none;
}

.home-page .main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
}

.home-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.home-brand {
  margin-bottom: 28px;
}