@import "tailwindcss"; @plugin "@tailwindcss/typography"; /* 暗色主题:根元素 class 切换(§8.2) */ @custom-variant dark (&:where(.dark, .dark *)); /* ── Tailwind 主题映射:工具类直接消费设计 token ───────────── */ @theme inline { --color-background: var(--background); --color-foreground: var(--foreground); --color-card: var(--card); --color-card-foreground: var(--card-foreground); --color-popover: var(--popover); --color-popover-foreground: var(--popover-foreground); --color-primary: var(--primary); --color-primary-foreground: var(--primary-foreground); --color-secondary: var(--secondary); --color-secondary-foreground: var(--secondary-foreground); --color-muted: var(--muted); --color-muted-foreground: var(--muted-foreground); --color-accent: var(--accent); --color-accent-foreground: var(--accent-foreground); --color-destructive: var(--destructive); --color-destructive-foreground: var(--destructive-foreground); --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); --color-sidebar: var(--sidebar); --color-sidebar-foreground: var(--sidebar-foreground); --color-sidebar-primary: var(--sidebar-primary); --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); --color-sidebar-accent: var(--sidebar-accent); --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); } @theme { --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; --font-serif: "DM Serif Display", ui-serif, Georgia, "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif; --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Cascadia Mono", monospace; } /* ============================================================ 设计 token —— 极简黑白灰体系(源自设计稿 theme-vars) brand = 冷灰 ramp;背景/文字/图标为纯灰 ramp。 ============================================================ */ :root { /* brand — 近黑主色 */ --brand-50: #fafafa; --brand-100: #f4f4f5; --brand-200: #e4e4e7; --brand-300: #d4d4d8; --brand-400: #a1a1aa; --brand-500: #71717a; --brand-600: #52525b; --brand-700: #3f3f46; --brand-800: #27272a; --brand-900: #18181b; /* 语义角色(浅色) */ --background: #ffffff; --card: #ffffff; --popover: #ffffff; --muted: var(--brand-100); --foreground: var(--brand-900); --card-foreground: var(--brand-900); --popover-foreground: var(--brand-900); --primary: var(--brand-900); --primary-foreground: var(--brand-50); --secondary: var(--brand-100); --secondary-foreground: var(--brand-900); --muted-foreground: var(--brand-500); --accent: var(--brand-100); --accent-foreground: var(--brand-900); --destructive: #dc2626; --destructive-foreground: #ffffff; --destructive-subtle: #fef2f2; --destructive-border: #fecaca; --destructive-text: #b91c1c; --input: var(--brand-200); --ring: var(--brand-900); --border: var(--brand-200); --border-strong: var(--brand-300); --success: #16a34a; --success-subtle: #f0fdf4; --success-border: #bbf7d0; --success-text: #15803d; --sidebar: var(--brand-50); --sidebar-foreground: var(--brand-900); --sidebar-primary: var(--brand-900); --sidebar-primary-foreground: var(--brand-50); --sidebar-accent: var(--brand-100); --sidebar-accent-foreground: var(--brand-900); --sidebar-border: var(--brand-200); /* 字体 */ --font-serif-display: var(--font-serif); --tracking-tight: -0.012em; /* 圆角 / 阴影 / 间距基数 */ --radius: 0.75rem; --radius-sm: 0.375rem; --radius-md: 0.75rem; --radius-lg: 1rem; --shadow-xs: 0 1px 1px 0 rgba(0, 0, 0, 0.04); --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 1px 0 rgba(0, 0, 0, 0.03); --space-4: 0.25rem; } .dark { --background: var(--brand-900); --card: var(--brand-800); --popover: var(--brand-800); --muted: var(--brand-800); --foreground: var(--brand-50); --card-foreground: var(--brand-50); --popover-foreground: var(--brand-50); --primary: var(--brand-50); --primary-foreground: var(--brand-900); --secondary: var(--brand-800); --secondary-foreground: var(--brand-50); --muted-foreground: var(--brand-400); --accent: var(--brand-700); --accent-foreground: var(--brand-50); --destructive: #ef4444; --destructive-foreground: var(--brand-50); --destructive-subtle: #2a1416; --destructive-border: #7f1d1d; --destructive-text: #fca5a5; --input: var(--brand-700); --ring: var(--brand-300); --border: var(--brand-700); --border-strong: var(--brand-600); --success: #22c55e; --success-subtle: #0f2417; --success-border: #166534; --success-text: #4ade80; --sidebar: var(--brand-800); --sidebar-foreground: var(--brand-50); --sidebar-primary: var(--brand-50); --sidebar-primary-foreground: var(--brand-900); --sidebar-accent: var(--brand-700); --sidebar-accent-foreground: var(--brand-50); --sidebar-border: var(--brand-700); } /* ── 基础 ─────────────────────────────────────────────── */ html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; } body { margin: 0; background: var(--background); color: var(--foreground); font-family: var(--font-sans); font-size: 14px; line-height: 1.6; } button, input, textarea, select { font: inherit; color: inherit; } a:focus-visible, button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; } ::placeholder { color: var(--muted-foreground); } .pn-loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted-foreground); font-size: 14px; } /* ============================================================ 共享组件类 —— 源自设计稿 components.css ============================================================ */ /* ── Button ── */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-4); min-width: 0; border: 1px solid transparent; border-radius: var(--radius-md); padding: var(--space-4) calc(var(--space-4) * 3); font: 600 14px/1 var(--font-sans); cursor: pointer; text-decoration: none; transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease; } .btn:focus-visible { outline: 2px solid var(--color-primary, var(--primary)); outline-offset: 2px; } .btn:disabled { cursor: not-allowed; opacity: 0.5; box-shadow: none; } .btn.primary { background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-sm); } .btn.primary:hover:not(:disabled), .btn.primary:active:not(:disabled) { filter: brightness(0.96); } .btn.secondary { background: var(--card); color: var(--foreground); border-color: var(--border); } .btn.secondary:hover:not(:disabled), .btn.secondary:active:not(:disabled) { background: var(--muted); } .btn.ghost { background: transparent; color: var(--foreground); padding: calc(var(--space-4) * 0.75) calc(var(--space-4) * 2.5); } .btn.ghost:hover:not(:disabled), .btn.ghost:active:not(:disabled) { background: var(--muted); } .btn.danger { background: var(--destructive); color: var(--destructive-foreground); } .btn.danger:hover:not(:disabled), .btn.danger:active:not(:disabled) { filter: brightness(0.94); } .btn svg { flex: none; } /* ── Card ── */ .card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); box-shadow: var(--shadow-sm); } .card .title { font-size: 14px; font-weight: 600; color: var(--card-foreground); } .card .meta { font-size: 12px; color: var(--muted-foreground); } .card .divider { margin: 12px 0; border: 0; border-top: 1px solid var(--border); } .card .foot { display: flex; align-items: center; gap: 12px; } .eyebrow { font-size: 12px; color: var(--muted-foreground); } .metric .value { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; color: var(--card-foreground); } .metric { gap: 2px; } /* ── Pill ── */ .pill { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 3px 8px; border-radius: var(--radius-md); background: var(--primary); color: var(--primary-foreground); font-size: 11px; font-weight: 600; line-height: 1.4; } /* ── Tabs(分段控件) ── */ .tabs { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--muted); } .tabs a, .tabs button { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 12px; border: 0; border-radius: calc(var(--radius-md) - 3px); background: transparent; color: var(--muted-foreground); text-decoration: none; white-space: nowrap; font-size: 13px; font-weight: 500; cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; } .tabs a:hover, .tabs button:hover { color: var(--foreground); } .tabs .active { background: var(--primary); color: var(--primary-foreground); } .tabs .active:hover { color: var(--primary-foreground); } /* ── Table ── */ .table-card { min-width: 0; flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; } .table { width: 100%; border-collapse: collapse; } .table th, .table td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; } .table th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-foreground); background: var(--muted); white-space: nowrap; } .table td { color: var(--card-foreground); font-size: 13px; } .table tbody tr:last-child td { border-bottom: 0; } .table tbody tr { transition: background-color 0.15s ease; } .table tbody tr:hover { background: var(--muted); } .table-card .empty { display: grid; place-items: center; min-height: 132px; padding: 12px; color: var(--muted-foreground); background: var(--muted); font-size: 13px; } /* ── 状态点 / 分隔符 ── */ .dot { width: 7px; height: 7px; border-radius: 999px; background: currentColor; flex: none; } .sep { padding: 0 8px 0 0; color: var(--muted-foreground); } /* ============================================================ 博客端共享 shell —— 居中单栏 720px(设计稿博客系列) ============================================================ */ .pn-site-page { min-height: 100vh; display: flex; flex-direction: column; } .pn-site-header { position: sticky; top: 0; z-index: 20; background: var(--background); background: color-mix(in srgb, var(--background) 86%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); } .pn-site-header-inner { max-width: 720px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; box-sizing: border-box; } .pn-site-wordmark { font-family: var(--font-serif); font-size: 21px; line-height: 1; letter-spacing: var(--tracking-tight); color: var(--foreground); text-decoration: none; transition: color 0.15s ease; } .pn-site-wordmark:hover { color: var(--muted-foreground); } .pn-site-nav { display: flex; align-items: center; gap: 4px; } .pn-site-navlink { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: var(--radius-sm); background: transparent; font-size: 14px; font-weight: 500; color: var(--muted-foreground); text-decoration: none; cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; } .pn-site-navlink:hover { background: var(--muted); color: var(--foreground); } .pn-site-navlink[aria-current="page"], .pn-site-navlink.active { color: var(--foreground); font-weight: 600; } .pn-site-navlink svg { width: 14px; height: 14px; } .pn-site-main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; } .pn-site-footer { margin-top: 72px; border-top: 1px solid var(--border); } .pn-site-footer-inner { max-width: 720px; margin: 0 auto; padding: 24px 24px 32px; box-sizing: border-box; text-align: center; font-size: 12.5px; color: var(--muted-foreground); } .pn-site-footer-inner a { color: var(--muted-foreground); text-decoration: none; } .pn-site-footer-inner a:hover { color: var(--foreground); } .pn-site-footer-line { margin: 0; } .pn-site-beian { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; } .pn-site-beian img { width: 14px; height: 14px; flex: none; opacity: 0.85; } .pn-site-beian:hover img { opacity: 1; } @media (max-width: 640px) { .pn-site-header-inner { height: 56px; padding: 0 20px; } .pn-site-main { padding: 0 20px; } .pn-site-navlink.hide-sm { display: none; } } /* ============================================================ 首页(博客首页.html) ============================================================ */ .pn-home-content { padding-top: 56px; padding-bottom: 24px; } .pn-home-filter { margin-bottom: 8px; } .pn-home-post { padding: 30px 0; border-bottom: 1px solid var(--border); } .pn-home-post:last-child { border-bottom: 0; } .pn-home-date { display: block; margin-bottom: 10px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--muted-foreground); } .pn-home-pin { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; padding: 0 8px; border: 1px solid var(--border-strong, var(--border)); border-radius: 999px; font-family: var(--font-sans); font-size: 11px; font-weight: 500; line-height: 1.8; color: var(--foreground); vertical-align: 1px; } .pn-home-pin svg { color: var(--muted-foreground); } .pn-home-post-title { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 22px; line-height: 1.35; letter-spacing: var(--tracking-tight); } .pn-home-post-title a { display: flex; align-items: center; gap: 10px; color: var(--foreground); text-decoration: none; } .pn-home-arrow { width: 17px; height: 17px; flex: none; margin-left: auto; color: var(--muted-foreground); opacity: 0; transition: opacity 0.15s ease, color 0.15s ease; } .pn-home-post:hover .pn-home-arrow { opacity: 1; color: var(--foreground); } .pn-home-summary { margin: 10px 0 0; font-size: 14px; line-height: 1.75; color: var(--muted-foreground); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .pn-home-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; } .pn-home-tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--radius-sm); background: var(--muted); font-size: 12px; font-weight: 500; color: var(--muted-foreground); text-decoration: none; transition: background-color 0.15s ease, color 0.15s ease; } .pn-home-tag::before { content: "#"; margin-right: 3px; opacity: 0.65; } .pn-home-tag:hover { background: var(--accent); color: var(--foreground); } .pn-home-list-empty { padding: 64px 0; text-align: center; color: var(--muted-foreground); font-size: 14px; } /* 首页分页(对应设计稿 table-foot + pager) */ .pn-home-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); } .pn-home-pager-note { font-size: 12.5px; color: var(--muted-foreground); white-space: nowrap; } .pn-pager { display: flex; align-items: center; gap: 4px; flex-shrink: 0; } .pn-pager .btn.ghost { width: 28px; height: 28px; padding: 0; color: var(--muted-foreground); } .pn-pager .btn.ghost:hover:not(:disabled) { color: var(--foreground); } .pn-page-btn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 999px; background: transparent; font-size: 12.5px; font-weight: 500; color: var(--muted-foreground); cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; } .pn-page-btn:hover { background: var(--muted); color: var(--foreground); } .pn-page-btn.is-active { background: var(--primary); color: var(--primary-foreground); font-weight: 600; } @media (max-width: 640px) { .pn-home-content { padding-top: 40px; } .pn-home-post { padding: 26px 0; } .pn-home-post-title { font-size: 20px; } } /* ============================================================ 笔记详情(笔记详情.html) ============================================================ */ .pn-note-article { padding-top: 40px; padding-bottom: 8px; } .pn-note-back { margin-left: -10px; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted-foreground); } .pn-note-back:hover { color: var(--foreground); } .pn-note-back svg { width: 14px; height: 14px; } .pn-note-title { margin: 18px 0 0; font-family: var(--font-serif); font-weight: 400; font-size: 36px; line-height: 1.25; letter-spacing: var(--tracking-tight); color: var(--foreground); } .pn-note-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 18px; font-size: 13px; color: var(--muted-foreground); } .pn-note-meta-date { font-family: var(--font-mono); font-size: 12.5px; } .pn-note-meta-sep { color: var(--border-strong); } .pn-note-meta-read { display: inline-flex; align-items: center; gap: 6px; } .pn-note-meta-read svg { width: 14px; height: 14px; } .pn-note-tag { padding: 3px 10px; border-radius: var(--radius-md); font-size: 12px; font-weight: 500; background: transparent; color: var(--muted-foreground); border: 1px solid var(--border); text-decoration: none; transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; } .pn-note-tag:hover { color: var(--foreground); background: var(--muted); border-color: var(--border-strong); } /* 私有预览提示(保留既有功能,套用 token) */ .pn-note-private { display: flex; align-items: center; gap: 8px; margin-top: 32px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--muted); color: var(--muted-foreground); font-size: 13px; } .pn-note-private svg { flex: none; width: 15px; height: 15px; } /* 上一篇 / 下一篇 */ .pn-note-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); } .pn-note-nav-card { padding: 18px 20px; gap: 8px; text-decoration: none; transition: background-color 0.15s ease, border-color 0.15s ease; } .pn-note-nav-card:hover { background: var(--muted); border-color: var(--border-strong); } .pn-note-nav-label { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--muted-foreground); } .pn-note-nav-label svg { width: 14px; height: 14px; } .pn-note-nav-title { font-family: var(--font-serif); font-size: 17px; line-height: 1.45; letter-spacing: var(--tracking-tight); color: var(--foreground); } .pn-note-nav-next { text-align: right; } .pn-note-nav-next .pn-note-nav-label { justify-content: flex-end; } @media (max-width: 640px) { .pn-note-article { padding-top: 32px; } .pn-note-title { font-size: 28px; } .pn-note-body { margin-top: 32px !important; } .pn-note-postnav { grid-template-columns: 1fr; gap: 12px; } .pn-note-nav-next { text-align: left; } .pn-note-nav-next .pn-note-nav-label { justify-content: flex-start; } } /* ============================================================ 正文排版(MarkdownViewer)—— .pn-note-body ============================================================ */ .pn-note-body { margin-top: 40px; font-size: 15px; line-height: 1.8; color: var(--foreground); } .pn-note-body > :first-child { margin-top: 0; } .pn-note-body p { margin: 0 0 24px; } .pn-note-body h1, .pn-note-body h2, .pn-note-body h3, .pn-note-body h4 { margin: 40px 0 16px; font-family: var(--font-serif); font-weight: 400; line-height: 1.35; letter-spacing: var(--tracking-tight); color: var(--foreground); } .pn-note-body h1 { font-size: 26px; } .pn-note-body h2 { font-size: 24px; } .pn-note-body h3 { font-size: 19px; } .pn-note-body h4 { font-size: 16px; } .pn-note-body blockquote { margin: 32px 0; padding: 2px 0 2px 20px; border-left: 2px solid var(--border-strong); color: var(--muted-foreground); } .pn-note-body blockquote p { margin: 0 0 8px; } .pn-note-body blockquote p:last-child { margin-bottom: 0; } .pn-note-body code { font-family: var(--font-mono); font-size: 13px; background: var(--muted); border-radius: var(--radius-sm); padding: 2px 6px; } .pn-note-body pre { position: relative; margin: 24px 0 32px; padding: 16px 18px; background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-md); overflow-x: auto; box-sizing: border-box; } .pn-note-body pre code { display: block; background: transparent; padding: 0; font-size: 13px; line-height: 1.7; color: var(--foreground); white-space: pre; } .pn-note-body ul, .pn-note-body ol { margin: 0 0 24px; padding-left: 22px; } .pn-note-body li { margin-bottom: 10px; } .pn-note-body li::marker { color: var(--muted-foreground); } .pn-note-body li > ul, .pn-note-body li > ol { margin: 10px 0 0; } .pn-note-body img { max-width: 100%; border-radius: var(--radius-md); border: 1px solid var(--border); } .pn-note-body hr { margin: 36px 0; border: 0; border-top: 1px solid var(--border); } .pn-note-body table { width: 100%; margin: 24px 0; border-collapse: collapse; font-size: 13.5px; } .pn-note-body th, .pn-note-body td { padding: 8px 12px; border: 1px solid var(--border); text-align: left; } .pn-note-body th { background: var(--muted); font-weight: 600; } .pn-note-body a { color: var(--foreground); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); } .pn-note-body a:hover { text-decoration-color: var(--foreground); } .pn-note-body del { color: var(--muted-foreground); } .pn-note-body input[type="checkbox"] { margin-right: 6px; accent-color: var(--primary); } /* highlight.js:单色系高亮(粗细 + 灰阶区分) */ .pn-note-body .hljs-keyword, .pn-note-body .hljs-tag, .pn-note-body .hljs-name { font-weight: 600; } .pn-note-body .hljs-string, .pn-note-body .hljs-attr, .pn-note-body .hljs-attribute, .pn-note-body .hljs-symbol, .pn-note-body .hljs-bullet { color: var(--muted-foreground); } .pn-note-body .hljs-comment, .pn-note-body .hljs-quote { color: var(--muted-foreground); font-style: italic; } /* 代码块复制按钮 */ .pn-copy-btn { position: absolute; right: 8px; top: 8px; padding: 2px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); color: var(--muted-foreground); font-size: 12px; line-height: 1.6; cursor: pointer; opacity: 0; transition: opacity 0.15s ease, color 0.15s ease; } .pn-note-body pre:hover .pn-copy-btn, .pn-copy-btn:focus-visible { opacity: 1; } .pn-copy-btn:hover { color: var(--foreground); } /* ============================================================ 标签归档(标签归档.html) ============================================================ */ .pn-tag-content { padding-top: 48px; padding-bottom: 64px; } .pn-tag-pagehead h1 { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 40px; line-height: 1.2; letter-spacing: var(--tracking-tight); color: var(--foreground); } .pn-tag-pagehead p { margin: 10px 0 0; font-size: 15px; line-height: 1.7; color: var(--muted-foreground); } .pn-tag-cloud { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; } .pn-tag-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); color: var(--foreground); font-size: 14px; font-weight: 500; line-height: 1; text-decoration: none; transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; } .pn-tag-pill:hover { background: var(--muted); } .pn-tag-pill svg { width: 14px; height: 14px; flex: none; color: var(--muted-foreground); } .pn-tag-count { font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); } .pn-tag-pill.active { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); box-shadow: none; } .pn-tag-pill.active svg, .pn-tag-pill.active .pn-tag-count { color: var(--primary-foreground); } .pn-tag-groups { margin-top: 48px; display: flex; flex-direction: column; gap: 40px; } .pn-tag-group-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-family: var(--font-serif); font-weight: 400; font-size: 22px; line-height: 1.3; letter-spacing: var(--tracking-tight); color: var(--foreground); } .pn-tag-group-title svg { width: 16px; height: 16px; flex: none; color: var(--muted-foreground); } .pn-tag-row { display: flex; align-items: center; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--border); color: var(--foreground); text-decoration: none; transition: background-color 0.15s ease; } .pn-tag-rows .pn-tag-row:first-child { border-top: 1px solid var(--border); } .pn-tag-date { flex: none; width: 88px; font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); } .pn-tag-title { flex: 1; min-width: 0; font-size: 15px; line-height: 1.6; transition: color 0.15s ease; } .pn-tag-row:hover .pn-tag-title { text-decoration: underline; text-underline-offset: 4px; } .pn-tag-arrow { flex: none; opacity: 0; transition: opacity 0.15s ease; } .pn-tag-arrow svg { width: 16px; height: 16px; display: block; } .pn-tag-row:hover .pn-tag-arrow, .pn-tag-row:focus-visible .pn-tag-arrow { opacity: 1; } @media (max-width: 640px) { .pn-tag-content { padding-top: 32px; padding-bottom: 48px; } .pn-tag-pagehead h1 { font-size: 32px; } .pn-tag-cloud { margin-top: 24px; } .pn-tag-groups { margin-top: 40px; gap: 32px; } .pn-tag-date { width: 78px; font-size: 11px; } } /* ============================================================ 404(404 页面.html) ============================================================ */ .pn-404-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 24px; background: var(--background); } .pn-404-code { margin: 0; font-family: var(--font-mono); font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: var(--tracking-tight); color: var(--border); } .pn-404-title { margin: 24px 0 0; font-family: var(--font-serif); font-size: 28px; font-weight: 400; line-height: 1.3; letter-spacing: var(--tracking-tight); color: var(--foreground); } .pn-404-desc { margin: 12px 0 0; font-size: 15px; line-height: 1.7; color: var(--muted-foreground); } .pn-404-actions { margin-top: 32px; display: flex; align-items: center; justify-content: center; } .pn-404-actions .btn svg { width: 16px; height: 16px; } @media (max-width: 480px) { .pn-404-code { font-size: 56px; } .pn-404-title { font-size: 24px; } } /* ============================================================ 管理员登录(管理员登录.html) ============================================================ */ .pn-login-wrap { min-height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 32px 16px; background: var(--background); } .pn-login-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; } .pn-login-eyebrow { font-family: var(--font-mono); font-size: 11px; line-height: 1; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted-foreground); } .pn-login-wordmark { font-family: var(--font-serif); font-size: 28px; line-height: 1; font-weight: 400; letter-spacing: var(--tracking-tight); color: var(--foreground); } .pn-login-card { box-sizing: border-box; width: 100%; max-width: 380px; padding: 28px 24px; gap: 0; } .pn-login-title { margin: 0 0 6px; font-size: 16px; line-height: 1.4; font-weight: 600; color: var(--foreground); } .pn-login-sub { margin: 0 0 20px; font-size: 13px; line-height: 1.6; color: var(--muted-foreground); } .pn-login-field { position: relative; display: flex; align-items: center; } .pn-login-icon { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted-foreground); pointer-events: none; } .pn-login-input { box-sizing: border-box; width: 100%; height: 44px; padding: 0 42px 0 38px; border: 1px solid var(--input); border-radius: var(--radius-sm); background: var(--card); color: var(--foreground); font: 14px/1.4 var(--font-sans); outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease; } .pn-login-input:hover { border-color: var(--border-strong); } .pn-login-input:focus { outline: 2px solid var(--ring); outline-offset: 1px; border-color: var(--ring); } .pn-login-eye { position: absolute; right: 6px; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted-foreground); cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; } .pn-login-eye:hover { background: var(--muted); color: var(--foreground); } .pn-login-eye svg { width: 16px; height: 16px; } .pn-login-error { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--destructive-border); border-radius: var(--radius-sm); background: var(--destructive-subtle); color: var(--destructive-text); font-size: 13px; line-height: 1.5; } .pn-login-error svg { flex: none; width: 15px; height: 15px; } .pn-login-submit { width: 100%; height: 44px; margin-top: 20px; font-size: 14px; } .pn-login-submit svg { width: 16px; height: 16px; } .pn-login-hint { margin: 16px 0 0; text-align: center; font-size: 12px; line-height: 1.6; color: var(--muted-foreground); } .pn-login-back { color: var(--muted-foreground); font-weight: 500; } .pn-login-back:hover { color: var(--foreground); background: var(--muted); } .pn-login-back svg { width: 14px; height: 14px; } @media (max-width: 480px) { .pn-login-card { padding: 24px 20px; } .pn-login-wordmark { font-size: 26px; } } /* ============================================================ 管理后台共享 shell —— sidebar + topbar + 移动端 tabbar (统一自 笔记管理/笔记编辑器/回收站/站点设置 四稿) ============================================================ */ .pn-admin-shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; background: var(--background); color: var(--foreground); } .pn-admin-sidebar { width: auto; min-height: 0; height: 100vh; position: sticky; top: 0; align-self: start; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 20px 14px; background: var(--sidebar); color: var(--sidebar-foreground); border: 0; border-right: 1px solid var(--sidebar-border); border-radius: 0; box-shadow: none; box-sizing: border-box; } .pn-admin-brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 0; font-weight: 400; color: var(--sidebar-foreground); text-decoration: none; } .pn-admin-brand-mark { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--sidebar-primary); color: var(--sidebar-primary-foreground); font-family: var(--font-serif); font-size: 15px; line-height: 1; } .pn-admin-brand-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .pn-admin-eyebrow { font-family: var(--font-mono); font-size: 10px; line-height: 1; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-foreground); } .pn-admin-brand-copy strong { font-size: 14px; font-weight: 600; line-height: 1.3; letter-spacing: var(--tracking-tight); color: var(--sidebar-foreground); } .pn-admin-section { padding: 0 10px; margin-bottom: -6px; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); } .pn-admin-nav { display: flex; flex-direction: column; gap: 2px; } .pn-admin-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--sidebar-foreground); font-size: 13px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; } .pn-admin-item:hover { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); } .pn-admin-item.active { background: var(--sidebar-primary); color: var(--sidebar-primary-foreground); font-weight: 600; } .pn-admin-item svg { width: 15px; height: 15px; flex: none; color: var(--muted-foreground); transition: color 0.15s ease; } .pn-admin-item:hover svg { color: var(--sidebar-accent-foreground); } .pn-admin-item.active svg { color: var(--sidebar-primary-foreground); } .pn-admin-foot { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--sidebar-border); } .pn-admin-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px 2px; } .pn-admin-user-actions { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; } .pn-admin-iconbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted-foreground); text-decoration: none; cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; } .pn-admin-iconbtn:hover { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); } .pn-admin-iconbtn svg { width: 15px; height: 15px; } /* CSS 悬浮 tooltip(原生 title 延迟高且部分环境不显示) */ .pn-admin-iconbtn::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 30; padding: 4px 8px; border-radius: var(--radius-sm); background: var(--primary); color: var(--primary-foreground); font-size: 11px; font-weight: 500; line-height: 1.4; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-50%, 2px); transition: opacity 0.15s ease, transform 0.15s ease; } .pn-admin-iconbtn::before { content: ""; position: absolute; left: 50%; bottom: 100%; z-index: 30; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--primary); opacity: 0; pointer-events: none; transition: opacity 0.15s ease; } .pn-admin-iconbtn:hover::after, .pn-admin-iconbtn:focus-visible::after { opacity: 1; transform: translate(-50%, 0); } .pn-admin-iconbtn:hover::before, .pn-admin-iconbtn:focus-visible::before { opacity: 1; } .pn-admin-avatar { width: 28px; height: 28px; flex: none; border-radius: 999px; background: var(--sidebar-primary); color: var(--sidebar-primary-foreground); display: grid; place-items: center; font-size: 11px; font-weight: 600; } .pn-admin-avatar svg { width: 14px; height: 14px; } .pn-admin-user-meta { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; } .pn-admin-user-name { font-size: 13px; font-weight: 600; color: var(--sidebar-foreground); } .pn-admin-user-role { font-size: 11px; color: var(--muted-foreground); } /* 主区 / topbar */ .pn-admin-main { min-width: 0; display: flex; flex-direction: column; } .pn-admin-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; background: var(--background); border-bottom: 1px solid var(--border); } .pn-admin-topbar h1 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: var(--tracking-tight); color: var(--foreground); } .pn-admin-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; } .pn-admin-actions .btn { height: 34px; font-size: 13px; } .pn-admin-actions .btn.ghost { color: var(--muted-foreground); } .pn-admin-actions .btn.ghost:hover { color: var(--foreground); } .pn-admin-actions .btn svg { width: 15px; height: 15px; } .pn-admin-content { padding: 24px; display: flex; flex-direction: column; gap: 20px; min-width: 0; } /* 搜索框(topbar 内) */ .pn-admin-search { display: flex; align-items: center; gap: 8px; height: 34px; width: 248px; padding: 0 10px; border: 1px solid var(--input); border-radius: var(--radius-sm); background: var(--card); transition: border-color 0.15s ease; } .pn-admin-search:focus-within { border-color: var(--ring); outline: 2px solid var(--ring); outline-offset: 1px; } .pn-admin-search svg { width: 14px; height: 14px; flex: none; color: var(--muted-foreground); } .pn-admin-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; color: var(--foreground); } /* 移动端 tabbar(<768px) */ .pn-admin-tabbar { display: none; } /* 响应式 */ @media (max-width: 1023px) { .pn-admin-shell { grid-template-columns: 224px minmax(0, 1fr); } .pn-admin-content { padding: 20px; } } @media (max-width: 767px) { .pn-admin-shell { grid-template-columns: minmax(0, 1fr); } .pn-admin-sidebar { display: none; } .pn-admin-topbar { padding: 12px 16px; } .pn-admin-topbar h1 { font-size: 16px; } .pn-admin-search { display: none; } .pn-admin-content { padding: 16px 16px 92px; gap: 16px; } .pn-admin-tabbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: 62px; padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--card); border-top: 1px solid var(--border); } .pn-admin-tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; margin: 6px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 500; color: var(--muted-foreground); text-decoration: none; transition: background-color 0.15s ease, color 0.15s ease; } .pn-admin-tabbar a svg { width: 18px; height: 18px; color: currentColor; } .pn-admin-tabbar a.is-active { background: var(--sidebar-accent); color: var(--foreground); font-weight: 600; } } /* ============================================================ 笔记管理(笔记管理.html) ============================================================ */ .pn-al-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } .pn-al-metrics .card { padding: 16px 18px; gap: 2px; box-shadow: var(--shadow-xs); } .pn-al-metrics .eyebrow { font-size: 11.5px; letter-spacing: 0.04em; } .pn-al-metrics .value { font-size: 28px; line-height: 1.2; margin: 2px 0; } .pn-al-metrics .meta { font-size: 12px; line-height: 1.5; } .pn-al-table-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); } .pn-al-tab-num { font-family: var(--font-mono); font-size: 11px; margin-left: 5px; opacity: 0.65; } .pn-al-table-note { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; } .pn-table-scroll { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; } .pn-al-table-card .table { min-width: 600px; } .pn-al-note-title { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; letter-spacing: var(--tracking-tight); color: var(--foreground); } .pn-al-note-title svg { width: 12px; height: 12px; flex: none; color: var(--muted-foreground); } .pn-al-is-draft .pn-al-note-title { color: var(--muted-foreground); font-weight: 500; } .pn-al-note-slug { display: block; margin-top: 1px; font-family: var(--font-mono); font-size: 11px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; } .pn-al-tags { display: flex; flex-wrap: wrap; gap: 6px; } .pn-al-tag { display: inline-flex; align-items: center; padding: 2px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); font-size: 11.5px; line-height: 1.6; color: var(--muted-foreground); white-space: nowrap; } .pn-al-date { font-family: var(--font-mono); font-size: 12.5px; color: var(--foreground); white-space: nowrap; } .pn-al-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; white-space: nowrap; } .pn-al-status.pn-al-is-public { color: var(--success-text); } .pn-al-status.pn-al-is-public .dot { background: var(--success); } .pn-al-status.pn-al-is-draft { color: var(--muted-foreground); } .pn-al-status.pn-al-is-draft .dot { background: var(--muted-foreground); opacity: 0.55; } .pn-al-actions-cell { display: flex; align-items: center; justify-content: flex-end; gap: 4px; } .pn-al-col-actions { width: 1%; white-space: nowrap; text-align: right; } .pn-icon-btn { width: 30px; height: 30px; padding: 0; border-radius: var(--radius-sm); color: var(--muted-foreground); } .pn-icon-btn:hover:not(:disabled) { color: var(--foreground); } .pn-icon-btn.danger { background: transparent; color: var(--destructive-text); } .pn-icon-btn.danger:hover:not(:disabled) { background: var(--destructive-subtle); color: var(--destructive-text); filter: none; } .pn-al-table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border); } .pn-al-foot-note { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; } @media (max-width: 767px) { .pn-al-metrics { gap: 8px; } .pn-al-metrics .card { padding: 12px; } .pn-al-metrics .value { font-size: 22px; } .pn-al-metrics .meta { display: none; } .pn-al-table-note { display: none; } .pn-al-table-foot { flex-wrap: wrap; gap: 8px; } } /* ============================================================ 笔记编辑器(笔记编辑器.html) ============================================================ */ .pn-ae-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; } .pn-ae-editor { padding: 24px; gap: 0; min-width: 0; } .pn-ae-title-input { width: 100%; margin: 0 0 14px; padding: 0; border: 0; background: transparent; font-family: var(--font-serif); font-size: 30px; line-height: 1.3; letter-spacing: var(--tracking-tight); color: var(--foreground); outline: none; } .pn-ae-title-input::placeholder { color: var(--muted-foreground); } .pn-ae-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 14px; } .pn-ae-slug { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); min-width: 0; overflow: hidden; } .pn-ae-slug svg { width: 12px; height: 12px; flex: none; } .pn-ae-slug span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pn-ae-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; } .pn-ae-tag { flex-direction: row; align-self: auto; padding: 4px 6px 4px 10px; border: 1px solid var(--border); background: var(--card); color: var(--foreground); font-size: 12px; font-weight: 500; } .pn-ae-tag-x { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted-foreground); cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; } .pn-ae-tag-x:hover { background: var(--muted); color: var(--foreground); } .pn-ae-tag-x svg { width: 12px; height: 12px; } .pn-ae-add-tag { height: 26px; gap: 6px; padding: 0 10px; border: 1px dashed var(--border-strong); color: var(--muted-foreground); font-size: 12px; font-weight: 500; } .pn-ae-add-tag:hover { background: var(--muted); color: var(--foreground); } .pn-ae-add-tag svg { width: 13px; height: 13px; } .pn-ae-tag-input { height: 26px; width: 110px; padding: 0 10px; border: 1px solid var(--input); border-radius: 999px; background: var(--card); color: var(--foreground); font-size: 12px; outline: none; } .pn-ae-tag-input:focus { border-color: var(--ring); } .pn-ae-toolbar { display: flex; align-items: center; gap: 4px; margin: 0 0 18px; padding: 8px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); } .pn-ae-tool { width: 32px; height: 32px; padding: 0; border-radius: var(--radius-sm); color: var(--muted-foreground); } .pn-ae-tool:hover:not(:disabled) { background: var(--accent); color: var(--foreground); } .pn-ae-tool svg { width: 15px; height: 15px; } .pn-ae-tool-hint { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted-foreground); white-space: nowrap; } .pn-ae-body-wrap { min-height: 420px; border-radius: var(--radius-sm); } .pn-ae-preview { margin-top: 20px; padding: 4px 2px 0; border-top: 1px solid var(--border); } .pn-ae-preview .pn-note-body { margin-top: 20px; } .pn-ae-upload-msg { margin: 10px 0 0; font-size: 12px; color: var(--muted-foreground); } /* 发布设置侧卡 */ .pn-ae-side { position: sticky; top: 86px; min-width: 0; display: flex; flex-direction: column; gap: 16px; } .pn-ae-publish { padding: 20px; gap: 0; } .pn-ae-publish .title { margin: 0 0 12px; font-size: 14px; font-weight: 600; } .pn-ae-prow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13px; } .pn-ae-plabel { color: var(--muted-foreground); } .pn-ae-pvalue { display: inline-flex; align-items: center; gap: 7px; color: var(--foreground); } .pn-ae-pvalue.is-muted { color: var(--muted-foreground); } .pn-ae-pvalue svg { width: 14px; height: 14px; color: var(--muted-foreground); } .pn-ae-mono { font-family: var(--font-mono); font-size: 12px; } .pn-ae-pfield { display: flex; flex-direction: column; gap: 6px; padding: 10px 0 2px; } .pn-ae-pfield > label { font-size: 12px; font-weight: 500; color: var(--muted-foreground); } .pn-ae-input { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--input); border-radius: var(--radius-sm); background: var(--card); color: var(--foreground); font-family: var(--font-mono); font-size: 12px; outline: none; box-sizing: border-box; transition: border-color 0.15s ease; } .pn-ae-input:focus { border-color: var(--ring); outline: 2px solid var(--ring); outline-offset: 2px; } .pn-ae-input.is-error { border-color: var(--destructive); background: var(--destructive-subtle); } .pn-ae-textarea { height: auto; min-height: 68px; padding: 8px 10px; font-family: var(--font-sans); font-size: 12.5px; line-height: 1.6; resize: vertical; } .pn-ae-phint { font-size: 11px; line-height: 1.5; color: var(--muted-foreground); } .pn-ae-error { margin: 10px 0 0; font-size: 12px; color: var(--destructive-text); } .pn-ae-divider { margin: 14px 0; } .pn-ae-danger { width: 100%; height: 34px; gap: 7px; border: 1px solid var(--destructive-border); border-radius: var(--radius-sm); background: transparent; color: var(--destructive-text); font-size: 13px; font-weight: 500; padding: 0 12px; } .pn-ae-danger:hover:not(:disabled) { background: var(--destructive-subtle); } .pn-ae-danger svg { width: 15px; height: 15px; } /* 开关(发布设置) */ .pn-switch { position: relative; width: 36px; height: 20px; border: 0; border-radius: 999px; background: var(--border-strong); cursor: pointer; transition: background-color 0.15s ease; flex: none; } .pn-switch[aria-checked="true"] { background: var(--primary); } .pn-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-xs); transition: transform 0.15s ease; } .pn-switch[aria-checked="true"]::after { transform: translateX(16px); } @media (max-width: 900px) { .pn-ae-grid { grid-template-columns: minmax(0, 1fr); } .pn-ae-side { position: static; } } @media (max-width: 767px) { .pn-ae-title-input { font-size: 26px; } .pn-ae-tags { margin-left: 0; } } /* ============================================================ 回收站(回收站.html) ============================================================ */ .pn-at-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--muted-foreground); font-size: 13px; line-height: 1.6; } .pn-at-alert svg { width: 16px; height: 16px; flex: none; margin-top: 2px; } .pn-at-alert p { margin: 0; } .pn-at-table-card .table { min-width: 560px; } .pn-at-title-cell { min-width: 220px; } .pn-at-note-title { color: var(--muted-foreground); font-weight: 500; text-decoration: line-through; text-decoration-color: var(--border); } .pn-at-note-slug { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 11px; color: var(--muted-foreground); } .pn-at-mono { font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); white-space: nowrap; } .pn-at-days { font-family: var(--font-mono); font-size: 12px; color: var(--foreground); white-space: nowrap; } .pn-at-days-urgent { color: var(--destructive-text); } .pn-at-actions { display: flex; align-items: center; gap: 4px; white-space: nowrap; } .pn-at-actions .btn svg { width: 14px; height: 14px; } /* ============================================================ 站点设置(站点设置.html) ============================================================ */ .pn-as-content { max-width: 640px; } .pn-as-card { gap: 0; padding: 24px; } .pn-as-card-head { display: flex; flex-direction: column; gap: 4px; } .pn-as-card-head .title { font-size: 15px; } .pn-as-card-head .meta { font-size: 13px; line-height: 1.6; } .pn-as-card .divider { margin: 16px 0 20px; } .pn-as-fields { display: flex; flex-direction: column; gap: 18px; } .pn-as-field { display: flex; flex-direction: column; gap: 6px; } .pn-as-label { font-size: 13px; font-weight: 500; color: var(--muted-foreground); } .pn-as-input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--input); border-radius: var(--radius-sm); background: var(--card); color: var(--foreground); font-family: var(--font-sans); font-size: 14px; line-height: 1.5; outline: none; box-sizing: border-box; transition: border-color 0.15s ease, box-shadow 0.15s ease; } textarea.pn-as-input { height: auto; min-height: 76px; padding: 8px 12px; resize: vertical; line-height: 1.7; } .pn-as-input:hover { border-color: var(--border-strong); } .pn-as-input:focus { border-color: var(--ring); box-shadow: 0 0 0 2px var(--ring); } .pn-as-control { position: relative; display: flex; align-items: center; } .pn-as-control .pn-as-input { padding-left: 36px; } .pn-as-control.has-toggle .pn-as-input { padding-right: 40px; } .pn-as-leading-icon { position: absolute; left: 11px; width: 15px; height: 15px; color: var(--muted-foreground); pointer-events: none; } .pn-as-eye { position: absolute; right: 6px; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted-foreground); cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; } .pn-as-eye svg { width: 15px; height: 15px; } .pn-as-eye:hover { background: var(--muted); color: var(--foreground); } .pn-as-hint { margin: 0; font-size: 12px; color: var(--muted-foreground); line-height: 1.6; } .pn-as-msg { margin: 0; font-size: 12.5px; line-height: 1.6; } .pn-as-msg.ok { color: var(--success-text); } .pn-as-msg.err { color: var(--destructive-text); } .pn-as-card-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); } .pn-as-save-bar { position: sticky; bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); } .pn-as-save-hint { font-size: 12.5px; color: var(--muted-foreground); } .pn-as-save-bar .btn { min-height: 36px; padding: 0 16px; font-size: 13.5px; flex: none; } .pn-as-save-bar .btn svg { width: 15px; height: 15px; } @media (max-width: 767px) { .pn-as-card { padding: 20px; } .pn-as-save-bar { bottom: 88px; flex-wrap: wrap; } } /* ============================================================ Toast 与确认弹层(各管理页共用) ============================================================ */ .pn-toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--success-border); border-radius: var(--radius-md); background: var(--success-subtle); color: var(--success-text); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-sm); animation: pn-toast-in 0.18s ease; } .pn-toast svg { width: 16px; height: 16px; flex: none; } .pn-toast.is-error { border-color: var(--destructive-border); background: var(--destructive-subtle); color: var(--destructive-text); } @keyframes pn-toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } } @media (max-width: 767px) { .pn-toast { left: 16px; right: 16px; bottom: 80px; } } /* 确认弹层 */ .pn-modal-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--brand-900) 40%, transparent); } .pn-modal { width: 100%; max-width: 380px; padding: 24px; gap: 0; } .pn-modal h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--foreground); } .pn-modal p { margin: 8px 0 0; font-size: 13px; line-height: 1.7; color: var(--muted-foreground); overflow-wrap: anywhere; } .pn-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; } .pn-modal-actions .btn { height: 34px; font-size: 13px; } /* ============================================================ CodeMirror(编辑器,token 化) ============================================================ */ .cm-editor { height: 100%; background: var(--background); font-size: 14.5px; } .cm-editor.cm-focused { outline: none !important; } .cm-gutters { border-right: 1px solid var(--border); background: var(--muted); color: var(--muted-foreground); } .cm-activeLine, .cm-activeLineGutter { background: color-mix(in srgb, var(--muted) 55%, transparent) !important; } .pn-cm-drag { outline: 2px dashed var(--ring); outline-offset: -2px; } .pn-cm-drag-overlay { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 6%, transparent); font-size: 13px; font-weight: 500; color: var(--foreground); pointer-events: none; } /* ── 动效偏好 ─────────────────────────────────────────── */ @media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }