/*
 * Bang · 区块样式（前台与编辑器共用）
 * 只用裸类选择器，编辑器会自动加 .editor-styles-wrapper 前缀，两处都能命中。
 * 颜色用中性灰 currentColor 体系：浅色 / 深色自动可读，不依赖主题变量。
 * 规范：12px 圆角、无阴影、无 emoji、图片保留原色。
 * 渐变唯一例外：金句卡的白金 / 黑金淡渐变（用户 2026-11-11 明确要求），其余一律禁止。
 */

/* ---------- 核心区块黑白基线 ---------- */
.wp-block-image img,
.wp-block-gallery img,
.wp-block-cover,
.wp-block-media-text__media img,
.wp-block-embed iframe { border-radius: 12px; }
.wp-block-image,
.wp-block-gallery { margin-top: 22px; margin-bottom: 22px; }
.wp-block-image figcaption,
.wp-block-gallery figcaption,
.wp-block-embed figcaption { margin-top: 8px; text-align: center; font-size: 12px; line-height: 1.6; opacity: .55; }
.wp-block-gallery { gap: 8px; }
.wp-block-gallery .wp-block-image { overflow: hidden; border-radius: 12px; }
.wp-block-quote { margin: 22px 0; padding: 2px 0 2px 18px; border-left: 2px solid currentColor; }
.wp-block-quote p { margin: 0 0 8px; }
.wp-block-quote cite,
.wp-block-pullquote cite { font-size: 12px; font-style: normal; opacity: .6; }
.wp-block-pullquote { margin: 26px 0; padding: 20px 0; border-top: 1px solid rgba(128,128,128,.28); border-bottom: 1px solid rgba(128,128,128,.28); text-align: left; }
.wp-block-pullquote blockquote { margin: 0; }
.wp-block-separator { margin: 28px 0; border: 0; border-top: 1px solid rgba(128,128,128,.28); opacity: 1; }
.wp-block-table { margin: 22px 0; font-size: 14px; }
.wp-block-table table { width: 100%; border-collapse: collapse; }
.wp-block-table td,
.wp-block-table th { padding: 8px 10px; border: 1px solid rgba(128,128,128,.28); }
.wp-block-code,
.wp-block-preformatted,
.wp-block-verse { margin: 22px 0; padding: 14px 16px; border-radius: 12px; background: rgba(128,128,128,.07); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.7; overflow-x: auto; white-space: pre-wrap; }
.wp-block-columns { gap: 16px; }
.wp-block-button__link { padding: 10px 18px; border: 1px solid #000; border-radius: 12px; background: #000; color: #fff; font-size: 13px; line-height: 1.4; text-decoration: none; }
.wp-block-button__link:hover { opacity: .82; }
.wp-block-file a { text-decoration: underline; text-underline-offset: 3px; }
.wp-block-details summary { cursor: pointer; }
.wp-block-cover { overflow: hidden; }
.wp-block-embed { margin: 22px 0; }
.wp-block-heading { line-height: 1.4; }
.alignwide { max-width: 1120px; }
.alignfull { max-width: none; }
@media (max-width: 767px) {
  .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column { flex-basis: 100% !important; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wp-block-button__link { background: #fff; color: #000; border-color: #fff; }
}
:root[data-theme="dark"] .wp-block-button__link { background: #fff; color: #000; border-color: #fff; }

/* ---------- 图集 pianke/gallery ---------- */
.pk-gallery { margin: 28px 0; }
.pk-gallery a { position: relative; display: block; color: inherit; text-decoration: none; }
.pk-gallery img { display: block; width: 100%; object-fit: cover; border-radius: 12px; }
.pk-gallery a:hover { opacity: .88; }
/* 角标与放大镜：纯 CSS 画，不用 emoji / SVG / 阴影 */
.pk-gallery-count {
  position: absolute; right: 10px; bottom: 10px; padding: 5px 10px;
  border-radius: 12px; background: var(--ink, #000); color: var(--bg, #fff);
  font-size: 11px; line-height: 1.4; letter-spacing: .04em;
}
.pk-gallery-zoom {
  position: absolute; right: 10px; top: 10px; width: 30px; height: 30px;
  border-radius: 12px; background: var(--bg, #fff); opacity: .92;
}
.pk-gallery-zoom::before {
  content: ""; position: absolute; left: 8px; top: 8px; width: 11px; height: 11px;
  border: 1.5px solid var(--ink, #000); border-radius: 50%;
}
.pk-gallery-zoom::after {
  content: ""; position: absolute; left: 19px; top: 19px; width: 6px; height: 1.5px;
  background: var(--ink, #000); transform: rotate(45deg);
}
/* 主图 + 缩略条 */
.pk-gallery-stage { position: relative; }
.pk-gallery-main img { height: clamp(240px, 62vw, 420px); }
.pk-gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.pk-gallery-thumbs::-webkit-scrollbar { display: none; }
.pk-gallery-thumb { flex: 0 0 auto; width: 68px; opacity: .52; transition: opacity .2s; }
.pk-gallery-thumb img { height: 58px; }
.pk-gallery-thumb.is-current, .pk-gallery-thumb:hover { opacity: 1; }
.pk-gallery-thumb.is-current::after {
  content: ""; position: absolute; inset: 0; border: 2px solid var(--ink, #000); border-radius: 12px;
}
.pk-gallery--single .pk-gallery-thumbs { display: none; }
/* 拼贴宫格：三张以上首图占大格 */
.pk-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 104px; gap: 8px; }
.pk-gallery-cell img { height: 100%; }
.pk-gallery-cell:first-child:nth-last-child(n+3) { grid-column: span 2; grid-row: span 2; }
.pk-gallery--n2 .pk-gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
.pk-gallery--n1 .pk-gallery-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
.pk-gallery--n1 .pk-gallery-cell img { height: clamp(240px, 62vw, 420px); }
.pk-gallery figcaption { margin-top: 10px; font-size: 12px; line-height: 1.6; text-align: center; opacity: .55; }
.pk-gallery-empty { padding: 26px; border: 1px dashed rgba(128,128,128,.4); border-radius: 12px; font-size: 13px; text-align: center; opacity: .6; }
@media (min-width: 768px) {
  .pk-gallery-grid { grid-auto-rows: 132px; }
  .pk-gallery--n2 .pk-gallery-grid { grid-auto-rows: 240px; }
  .pk-gallery-thumb { width: 84px; }
  .pk-gallery-thumb img { height: 70px; }
}

/* ---------- 金句卡 pianke/quote：克制的白金 / 黑金渐变 ---------- */
/* 用 blockquote.pk-quote 提权，压过 style.css 的 .prose blockquote / .prose p，
   否则 padding 会被压成 2px、文字被强制成次级灰。 */
blockquote.pk-quote {
  position: relative; display: block; margin: 30px 0; padding: 26px 26px 22px 30px;
  border: 1px solid rgba(176,141,72,.18); border-left: 1px solid rgba(176,141,72,.18);
  border-radius: 12px; color: #1A1A1A;
}
blockquote.pk-quote { background: linear-gradient(135deg, #FFFFFF 0%, #FEFCF7 48%, #F7F1E3 100%); }
blockquote.pk-quote::before { content: "\201C"; position: absolute; top: 6px; left: 16px; font-size: 38px; line-height: 1; color: #B08D48; opacity: .38; }
blockquote.pk-quote::after { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 2px; border-radius: 2px; background: #C6A45C; opacity: .5; }
blockquote.pk-quote .pk-quote-text { margin: 0; font-size: 17px; line-height: 1.9; color: inherit; }
blockquote.pk-quote .pk-quote-source { display: block; margin-top: 14px; font-size: 12px; line-height: 1.6; color: #8C7549; }
blockquote.pk-quote .pk-quote-source::before { content: "\2014\2009"; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) blockquote.pk-quote { background: linear-gradient(135deg, #000000 0%, #0B0906 48%, #171207 100%); border-color: rgba(198,164,96,.22); color: #F5F2EA; }
  :root:not([data-theme="light"]) blockquote.pk-quote::before { color: #C6A45C; }
  :root:not([data-theme="light"]) blockquote.pk-quote .pk-quote-source { color: #B49A63; }
}
:root[data-theme="dark"] blockquote.pk-quote { background: linear-gradient(135deg, #000000 0%, #0B0906 48%, #171207 100%); border-color: rgba(198,164,96,.22); color: #F5F2EA; }
:root[data-theme="dark"] blockquote.pk-quote::before { color: #C6A45C; }
:root[data-theme="dark"] blockquote.pk-quote .pk-quote-source { color: #B49A63; }

/* ---------- 链接卡 pianke/linkcard ---------- */
.pk-linkcard { display: block; margin: 26px 0; padding: 18px 20px; border: 1px solid rgba(128,128,128,.28); border-radius: 12px; text-decoration: none; color: inherit; transition: opacity .2s; }
a.pk-linkcard:hover { opacity: .7; }
.pk-linkcard-title { display: block; font-size: 15px; line-height: 1.6; }
.pk-linkcard-desc { display: block; margin-top: 6px; font-size: 13px; line-height: 1.7; opacity: .65; }
.pk-linkcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 12px; opacity: .55; }
.pk-linkcard-host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-linkcard-arrow { position: relative; flex: none; width: 12px; height: 12px; }
.pk-linkcard-arrow::before { content: ""; position: absolute; top: 1px; right: 1px; width: 8px; height: 8px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; }

/* ---------- 元信息条 pianke/meta ---------- */
.pk-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; margin: 26px 0; padding-top: 16px; border-top: 1px solid rgba(128,128,128,.2); font-size: 12px; line-height: 1.6; }
.pk-meta-item { display: inline-flex; align-items: baseline; gap: 6px; }
.pk-meta-item + .pk-meta-item::before { content: ""; display: inline-block; width: 3px; height: 3px; margin: 0 10px 2px; border-radius: 50%; background: currentColor; opacity: .35; }
.pk-meta-label { opacity: .5; }
.pk-meta-value { opacity: .9; }
.pk-meta-placeholder { opacity: .5; }

/* ---------- 编辑器内的编辑界面（只在后台出现） ---------- */
.pk-gallery-editor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pk-gallery-editor-thumb { position: relative; }
.pk-gallery-editor-thumb img { display: block; width: 100%; height: 110px; object-fit: cover; border-radius: 12px; }
.pk-gallery-editor-remove { position: absolute; right: 6px; bottom: 6px; font-size: 11px; }
.pk-gallery-editor-add { min-height: 110px; justify-content: center; border: 1px dashed rgba(128,128,128,.5); border-radius: 12px; }
.pk-gallery-editor figcaption { margin-top: 10px; font-size: 12px; text-align: center; opacity: .55; }
.pk-meta-editor-row { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid rgba(128,128,128,.2); }

@media (prefers-reduced-motion: reduce) {
  .pk-gallery-thumb { transition: none; }
}

/* ============================================================
   0.13.0 · 内容区块套件
   中性灰 + currentColor，深浅色自动可读；12px 圆角，无阴影无渐变
   ============================================================ */

/* ---------- 提示框：四种状态靠图标形状与左边线区分，不用彩色 ---------- */
.pk-tip { margin: 22px 0; padding: 13px 16px 14px; border: 1px solid rgba(128,128,128,.28); border-left: 2px solid rgba(128,128,128,.45); border-radius: 12px; background: rgba(128,128,128,.045); font-size: 14px; line-height: 1.8; }
.pk-tip-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pk-tip-ico { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none; border: 1px solid rgba(128,128,128,.4); border-radius: 8px; }
.pk-tip-ico svg { width: 14px; height: 14px; }
.pk-tip-label { font-size: 11px; font-weight: 600; letter-spacing: .1em; opacity: .62; }
.pk-tip-title { font-size: 14px; font-weight: 600; }
.pk-tip-body { margin-top: 8px; font-size: 14px; line-height: 1.85; opacity: .9; }
.pk-tip-body p { margin: 0 0 8px; }
.pk-tip-body p:last-child { margin-bottom: 0; }
.pk-tip-body a { text-decoration: underline; text-underline-offset: 3px; }
.pk-tip-body code { padding: 1px 5px; border-radius: 5px; background: rgba(128,128,128,.14); font-size: .9em; }
.pk-tip--warning { border-left-style: dashed; border-left-width: 3px; }
.pk-tip--success { border-left-width: 3px; }
.pk-tip--success .pk-tip-ico { border-radius: 50%; }
.pk-tip--danger { border-left-width: 4px; }
.pk-tip--danger .pk-tip-ico { border-color: currentColor; }
.pk-tip--danger .pk-tip-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.pk-tip-wrap, .pk-fold-wrap, .pk-code-wrap { margin: 0; }

/* ---------- 代码块：语言标签 + 复制按钮 ---------- */
.pk-code { margin: 22px 0; border: 1px solid rgba(128,128,128,.28); border-radius: 12px; overflow: hidden; background: rgba(128,128,128,.06); }
.pk-code-bar { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 5px 8px 5px 14px; border-bottom: 1px solid rgba(128,128,128,.2); }
.pk-code-lang { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.pk-code-file { font-size: 11px; letter-spacing: 0; opacity: .55; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-code-copy { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; flex: none; padding: 5px 10px; border: 0; border-radius: 8px; background: #000; color: #fff; font-size: 11px; line-height: 1.2; font-family: inherit; cursor: pointer; transition: opacity .18s ease; }
.pk-code-copy:hover { opacity: .82; }
.pk-code-copy.is-done { opacity: .6; }
.pk-code-pre, .pk-code pre { margin: 0; padding: 14px 16px; border-radius: 0; background: none; overflow-x: auto; white-space: pre; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.75; tab-size: 2; }
.pk-code code { font: inherit; background: none; padding: 0; }
.pk-code--core > pre { margin-top: 0; }
.pk-code.is-editor .pk-code-pre { min-height: 90px; outline: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pk-code-copy { background: #fff; color: #000; }
}
:root[data-theme="dark"] .pk-code-copy { background: #fff; color: #000; }

/* ---------- 折叠内容：原生 details，无 JS 也能用 ---------- */
.pk-fold { margin: 22px 0; border: 1px solid rgba(128,128,128,.28); border-radius: 12px; overflow: hidden; }
.pk-fold-sum { display: flex; align-items: center; gap: 9px; padding: 12px 14px; font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.pk-fold-sum::-webkit-details-marker { display: none; }
.pk-fold-chev { display: inline-flex; transition: transform .22s cubic-bezier(.22,.8,.22,1); }
.pk-fold[open] .pk-fold-chev { transform: rotate(180deg); }
.pk-fold-hint { margin-left: auto; font-size: 11px; font-weight: 400; letter-spacing: .06em; opacity: .5; }
.pk-fold-body { padding: 12px 14px 15px; border-top: 1px solid rgba(128,128,128,.2); font-size: 14px; line-height: 1.85; }
.pk-fold-body p { margin: 0 0 8px; }
.pk-fold-body p:last-child { margin-bottom: 0; }
.pk-fold-body code { padding: 1px 5px; border-radius: 5px; background: rgba(128,128,128,.14); font-size: .9em; }
.pk-fold[open] .pk-fold-body { animation: pkFoldIn .22s cubic-bezier(.22,.8,.22,1); }
@keyframes pkFoldIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.pk-fold--core > summary { margin: 0; }
.pk-fold--core[open] > :not(summary) { animation: pkFoldIn .22s cubic-bezier(.22,.8,.22,1); }

/* ---------- 画廊 / 画展：连续图片并宫格 ---------- */
.pk-wall { display: grid; gap: 8px; margin: 22px 0; }
.pk-wall--grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 120px; }
.pk-wall--grid .pk-wall-cell:first-child:nth-last-child(n+3) { grid-column: span 2; grid-row: span 2; }
.pk-wall--n2 { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
.pk-wall--single { grid-template-columns: 1fr; }
.pk-wall-cell { display: block; overflow: hidden; border-radius: 12px; }
.pk-wall-cell img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pk-wall--single .pk-wall-cell img { height: auto; max-height: 74vh; object-fit: contain; }
.pk-wall-cell.is-current { outline: 2px solid currentColor; outline-offset: 2px; }
.pk-wall-cell:hover { opacity: .9; }
@media (max-width: 600px) {
  .pk-wall--grid { grid-auto-rows: 104px; }
  .pk-wall--n2 { grid-auto-rows: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .pk-fold-chev { transition: none; }
  .pk-fold[open] .pk-fold-body, .pk-fold--core[open] > :not(summary) { animation: none; }
}

/* ---------- 编辑器预览 ---------- */
.pk-tip.is-editor .pk-tip-ico { display: none; }
.pk-code-file { margin-left: 0; }
.pk-fold.is-editor .pk-fold-chev { display: none; }
