/* =========================================================
   子比公告通知 - 共用样式
   所有公告共用排版；通过 .zban-style-* 切换配色与图标，
   并通过 --zban-accent 变量（可由文章编辑框单独覆盖）。
   全部使用主题 CSS 变量，自动适配亮 / 暗色主题。
   ========================================================= */

/* ---------- 归档列表页（/notice/） ---------- */
.zban-archive {
    margin: 10px auto 0;
    max-width: 720px;
}
.zban-archive__title {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    color: var(--key-color, var(--main-color));
}
.zban-list--archive { margin: 0; }
.zban-list--archive .zban-list__item { border-bottom: 1px solid var(--main-border-color); }
.zban-list--archive .zban-list__item:last-child { border-bottom: 0; }
.zban-list--archive .zban-list__link {
    padding: 16px 10px;
    border-radius: var(--main-radius, 8px);
    transition: background .15s;
}
.zban-list--archive .zban-list__link:hover {
    background: color-mix(in srgb, var(--zban-accent) 8%, transparent);
    color: var(--main-color);
}
.zban-list--archive .zban-list__icon {
    font-size: 17px;
    margin-top: 2px;
}
.zban-list--archive .zban-list__text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--key-color, var(--main-color));
    white-space: normal;        /* 允许换行，不再单行省略 */
    word-break: break-word;
}
.zban-list--archive .zban-list__date {
    flex: 0 0 auto;
    align-self: center;
    color: var(--muted-2-color);
    font-size: 13px;
}
.zban-archive__empty {
    padding: 40px 0;
    text-align: center;
    color: var(--muted-color, #999);
}

/* 样式配色（强调色变量） */
.zban-style-announcement { --zban-accent: var(--theme-color, #f04494); }
.zban-style-notice       { --zban-accent: #2997f7; }
.zban-style-urgent       { --zban-accent: #f5222d; }
.zban-style-warning      { --zban-accent: #fa8c16; }
.zban-style-success      { --zban-accent: #52c41a; }
.zban-style-info         { --zban-accent: #13c2c2; }

/* ---------- 卡片 ---------- */
.zban-card {
    --zban-radius: var(--main-radius, 8px);
    position: relative;
    background: var(--main-bg-color);
    border: 2px solid var(--zban-accent);
    border-radius: var(--zban-radius);
    box-shadow: 0 0 10px var(--main-shadow);
    overflow: hidden;
    color: var(--main-color);
}

.zban-card__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    background: color-mix(in srgb, var(--zban-accent) 8%, var(--main-bg-color));
}

.zban-card__icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 100%;
    background: var(--zban-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 10px color-mix(in srgb, var(--zban-accent) 35%, transparent);
}

.zban-card__heading { min-width: 0; }

.zban-card__label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--zban-accent);
    line-height: 1.2;
}

.zban-card__title {
    margin: 4px 0 0;
    font-size: 22px;
    line-height: 1.4;
    font-weight: 700;
    color: var(--key-color);
    word-break: break-word;
}

.zban-card__subtitle {
    margin-top: 6px;
    color: var(--muted-color);
    font-size: 14px;
    line-height: 1.5;
}

/* 页脚有效期 / 过期提示（紧跟发布日期后） */
.zban-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}
.zban-card__expiry-inline {
    font-size: 13px;
    color: var(--muted-2-color);
}
.zban-card__expiry-inline.is-expired {
    color: #e23b3b;
    font-weight: 700;
}
.zban-card__expiry-inline::before {
    content: "·";
    margin-right: 10px;
    color: var(--muted-2-color);
}

/* 过期骑缝章：模拟盖章，横跨页头底与正文外侧 */
.zban-card__seal {
    position: absolute;
    top: 58px;
    right: 20px;
    width: 110px;
    height: 110px;
    border: 3px solid #e23b3b;
    border-radius: 50%;
    background: rgba(226, 59, 59, 0.05);
    color: #e23b3b;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transform: rotate(-16deg);
    box-shadow: inset 0 0 0 2px rgba(226, 59, 59, 0.3);
    pointer-events: none;
    z-index: 3;
}
.zban-card__seal-text {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 1px;
    padding: 8px;
}
@media (max-width: 480px) {
    .zban-card__seal { width: 88px; height: 88px; top: 52px; right: 14px; }
    .zban-card__seal-text { font-size: 13px; }
}

.zban-card__body {
    padding: 18px 22px;
    line-height: 1.85;
    font-size: 15px;
    color: var(--main-color);
    word-break: break-word;
}

.zban-card__body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--main-radius, 8px);
    margin: 10px 0;
    vertical-align: middle;
}

/* ---------- 整页背景图（图片由模板以内联方式注入，确保生效） ----------
   body.zban-page-bg 为整页满铺；.zban-page--bg 为同一效果的兜底（内容列）。
   上方固定一层主题页面底色半透明蒙版，保证页面级文字清晰可读，明暗主题自动适配。 */
body.zban-page-bg,
.zban-page--bg {
    background-color: var(--body-bg-color);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
body.zban-page-bg::before,
.zban-page--bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--body-bg-color);
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}

/* =========================================================
   正文排版（所有公告共用）
   适配子比全局 reset：重新落实 p / 标题 / 列表 / 引用 / 表格 / 代码 的间距与样式，
   否则这些元素会被主题 reset 清零成"光秃秃纯文本"。
   ========================================================= */
.zban-card__body > *:first-child { margin-top: 0; }
.zban-card__body > *:last-child  { margin-bottom: 0; }

.zban-card__body p {
    margin: 0 0 1em;
}

.zban-card__body h1,
.zban-card__body h2,
.zban-card__body h3,
.zban-card__body h4,
.zban-card__body h5,
.zban-card__body h6 {
    margin: 1.4em 0 0.7em;
    font-weight: 700;
    line-height: 1.4;
    color: var(--key-color, var(--main-color));
}
.zban-card__body h1 { font-size: 1.6em; }
.zban-card__body h2 { font-size: 1.4em; }
.zban-card__body h3 { font-size: 1.25em; }
.zban-card__body h4 { font-size: 1.1em; }
.zban-card__body h5 { font-size: 1em; }
.zban-card__body h6 { font-size: 0.92em; color: var(--muted-color); }

.zban-card__body ul,
.zban-card__body ol {
    margin: 0 0 1em;
    padding-left: 1.6em;
}
.zban-card__body ul { list-style: disc; }
.zban-card__body ol { list-style: decimal; }
.zban-card__body li { margin: 0.35em 0; }
.zban-card__body ul ul,
.zban-card__body ol ol,
.zban-card__body ul ol,
.zban-card__body ol ul { margin: 0.3em 0; }

.zban-card__body a {
    color: var(--zban-accent);
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--zban-accent) 40%, transparent);
}
.zban-card__body a:hover {
    color: var(--zban-accent);
    border-bottom-color: var(--zban-accent);
}

.zban-card__body strong,
.zban-card__body b { font-weight: 700; color: var(--key-color, var(--main-color)); }

.zban-card__body blockquote {
    margin: 0 0 1em;
    padding: 14px 18px;
    background: color-mix(in srgb, var(--zban-accent) 6%, transparent);
    border-left: 4px solid var(--zban-accent);
    color: var(--muted-color);
    border-radius: 0 var(--main-radius, 8px) var(--main-radius, 8px) 0;
}
.zban-card__body blockquote p:last-child { margin-bottom: 0; }

.zban-card__body hr {
    border: 0;
    border-top: 1px solid var(--main-border-color);
    margin: 1.6em 0;
}

.zban-card__body table {
    width: 100%;
    margin: 0 0 1em;
    border-collapse: collapse;
    font-size: 14px;
}
.zban-card__body th,
.zban-card__body td {
    padding: 9px 12px;
    border: 1px solid var(--main-border-color);
    text-align: left;
}
.zban-card__body th {
    background: color-mix(in srgb, var(--muted-bg-color, #f6f7f8) 70%, transparent);
    font-weight: 700;
}

.zban-card__body code,
.zban-card__body pre {
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 0.92em;
    background: color-mix(in srgb, var(--muted-bg-color, #f6f7f8) 80%, transparent);
    border-radius: 4px;
}
.zban-card__body code { padding: 2px 6px; }
.zban-card__body pre { padding: 14px 16px; overflow: auto; line-height: 1.6; }
.zban-card__body pre code { padding: 0; background: none; }

.zban-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 22px;
    border-top: 1px solid var(--main-border-color);
    background: color-mix(in srgb, var(--muted-bg-color, #f6f7f8) 60%, transparent);
}

.zban-card__date {
    color: var(--muted-2-color);
    font-size: 13px;
}

.zban-copy-btn {
    border: 1px solid var(--zban-accent);
    background: transparent;
    color: var(--zban-accent);
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: .15s;
}
.zban-copy-btn:hover { background: var(--zban-accent); color: #fff; }
.zban-copy-btn i { margin-right: 4px; }

/* ---------- 链接按钮 ---------- */
.zban-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--main-radius, 8px);
    background: var(--zban-accent);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--zban-accent) 30%, transparent);
    transition: .15s;
}
.zban-link-btn:hover { color: #fff; filter: brightness(1.05); text-decoration: none; }
.zban-link-btn i { font-size: 15px; }

/* ---------- 列表 ---------- */
.zban-list { list-style: none; margin: 0; padding: 0; }
.zban-list__item { border-bottom: 1px solid var(--main-border-color); }
.zban-list__item:last-child { border-bottom: 0; }
.zban-list__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 4px;
    color: var(--main-color);
    text-decoration: none;
}
.zban-list__link:hover { color: var(--zban-accent); text-decoration: none; }
.zban-list__icon { color: var(--zban-accent); flex: 0 0 auto; }
.zban-list__text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zban-list__date { flex: 0 0 auto; color: var(--muted-2-color); font-size: 12px; }

/* ---------- 单页外壳 ---------- */
.zban-page { padding: 30px 15px 50px; }
/* 隐藏页头时的独立页：仍保留主题背景与整屏高度 */
.zban-standalone {
    background: var(--body-bg-color);
    min-height: 100vh;
}
.zban-page__inner { max-width: 820px; margin: 0 auto; }
.zban-page__brand {
    text-align: center;
    color: var(--muted-2-color);
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 18px;
}
.zban-page__back { text-align: center; }

/* ---------- 后台列表小圆点 ---------- */
.zban-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 100%;
    background: var(--zban-accent);
    margin-right: 6px;
    vertical-align: middle;
}
