/* =====================================================================
 * great_cdn v2.0 · 三栏工作台 / AI 创作 / 素材库 / 选区上下文菜单 / 预览设备切换
 * 在 app.css 之后加载，只做「新增 & 覆盖」，不破坏既有类与 id。
 * ===================================================================== */

/* ---------- 顶部操作条（三栏显隐切换） ---------- */
.gcd-edit-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.gcd-col-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border: 1px solid var(--gcd-border);
    border-radius: 8px;
    background: #fff;
    color: var(--gcd-muted);
    font-size: 13px;
    cursor: pointer;
    transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.gcd-col-btn:hover { color: var(--gcd-primary); border-color: #b6c4d8; }
.gcd-col-btn.on { color: var(--gcd-primary); border-color: var(--gcd-primary); background: var(--gcd-primary-weak); }
.gcd-col-btn.gcd-ai-btn { border-color: #f9a8d4; color: #db2777; }
.gcd-col-btn.gcd-ai-btn:hover, .gcd-col-btn.gcd-ai-btn.on { background: #fdf2f8; border-color: #ec4899; }

/* ---------- 三栏工作区（编辑页顶栏以下整屏高） ---------- */
.gcd-page-edit .gcd-topbar-inner { max-width: none; }
.gcd-page-edit body { }
.gcd-page-edit .gcd-main {
    max-width: none;
    height: calc(100vh - 56px);
    padding: 12px;
    overflow: hidden;
}
/* 表单纵向填满工作区高度：工具栏(吸顶) + 工作区(flex:1 吸收剩余) + 底部操作条 */
.gcd-page-edit #gcd-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}
.gcd-workspace {
    display: flex;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
}
.gcd-ws-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: stretch;
}
.gcd-ws-col .gcd-pane-ai {
    margin-left: 0;
}

/* 左 tab 栏 + 中编辑器 复用原有 .gcd-split，但改为填满工作区 */
.gcd-workspace .gcd-split {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    height: 100%;
    margin-bottom: 0;
}
.gcd-workspace .gcd-pane-left {
    position: static;
    top: auto;
    align-self: stretch;
    max-height: none;
    height: 100%;
    width: 300px;
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    background: var(--gcd-panel);
}
.gcd-ws-col .gcd-divider { flex: 0 0 6px; }
.gcd-workspace .gcd-pane-right {
    height: 100%;
    min-height: 0;
}

/* 左栏 tab 头 */
.gcd-left-tabs {
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
    padding: 8px;
    border-bottom: 1px solid var(--gcd-border);
    background: #f7f8fb;
}
.gcd-left-tab {
    flex: 1;
    min-width: 0;
    padding: 8px 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--gcd-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s ease, color .12s ease, box-shadow .12s ease;
}
.gcd-left-tab:hover { color: var(--gcd-text); }
.gcd-left-tab.on {
    background: #fff;
    color: var(--gcd-primary);
    box-shadow: 0 1px 3px rgba(15, 30, 60, .12);
}
/* 左栏收起按钮（位于 tab 头右侧，与 AI 栏收起风格一致） */
.gcd-left-collapse {
    flex: 0 0 auto;
    width: 30px;
    margin-left: 2px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--gcd-muted);
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}
.gcd-left-collapse:hover { background: #eceef2; color: var(--gcd-text); }
@media (max-width: 960px) { .gcd-left-collapse { display: none; } }
.gcd-ltab-pane {
    display: none;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
}
.gcd-ltab-pane.on { display: block; }
.gcd-ltab-pane::-webkit-scrollbar { width: 5px; }
.gcd-ltab-pane::-webkit-scrollbar-thumb { background: #d7dbe0; border-radius: 5px; }
.gcd-ltab-pane::-webkit-scrollbar-thumb:hover { background: #c2c8cf; }

/* 中栏内部：head（工具栏+查找面板） + 编辑器 + 操作条 纵向排布 */
.gcd-pane-right-head {
    position: relative;
    flex: 0 0 auto;
}
.gcd-pane-right-head .gcd-toolbar-top {
    position: static;
    margin-bottom: 0;
    border: none;
    border-bottom: 1px solid var(--gcd-border);
    border-radius: 0;
    box-shadow: none;
}
.gcd-pane-right-head .gcd-findpanel { top: calc(100% + 8px); }
.gcd-pane-right #gcd-editor { flex: 1 1 auto; padding-top: 4px; }

/* 文档滚动容器：标题 + 正文是一整篇文档，一起滚动；标题随正文滚到顶上方消失（类飞书/Notion），
   而不是像之前那样固定在编辑器上方不动。编辑器自身不再自建滚动条（overflow:visible），
   整篇文档随 .gcd-doc-scroll 滚动；overscroll-behavior:contain 防止滚到顶/底时串到背后左栏或主页面。 */
.gcd-doc-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
}
.gcd-doc-scroll #gcd-editor {
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;        /* 取消编辑器独立滚动，整篇文档随容器滚动 */
}
/* 标题行：编辑器区域第一行，永远 H1 样式，视觉上与正文连续（类飞书/腾讯文档） */
.gcd-title-line {
    flex: 0 0 auto;
    padding: 20px 20px 2px;
    background: #fff;
    outline: none;
    border: none;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.4;
    color: var(--gcd-text);
    white-space: pre-wrap;
    word-break: break-word;
    cursor: text;
}
.gcd-title-line.is-empty::before {
    content: attr(data-placeholder);
    color: #c2c8cf;
    font-weight: 700;
    pointer-events: none;
}
.gcd-title-line.gcd-title-flash {
    animation: gcdTitleFlash 1.1s ease;
    border-radius: 6px;
}
@keyframes gcdTitleFlash {
    0%, 100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); background: #fff; }
    20%, 60% { box-shadow: 0 0 0 3px rgba(236, 72, 153, .35); background: #fff5f9; }
}
.gcd-workspace .gcd-pane-right .gcd-editor-free {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.gcd-pane-right .gcd-actions { position: static; border: none; border-top: 1px solid var(--gcd-border); border-radius: 0; }

/* ---------- 素材库 tab ---------- */
.gcd-mat-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.gcd-mat-toolbar .gcd-btn { flex: 1 1 auto; min-width: 0; text-align: center; }
.gcd-mat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gcd-mat-cell {
    position: relative;
    border: 1px solid var(--gcd-border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.gcd-mat-cell:hover { border-color: #b6c4d8; box-shadow: 0 4px 14px rgba(17, 24, 39, .08); }
.gcd-mat-thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; cursor: pointer; background: #f1f2f4; transition: background .15s ease; }
/* 鼠标经过时由 cover 切到 contain：完整显示图片（不裁切），留白处用底色填充 */
.gcd-mat-thumb:hover { object-fit: contain; background: #e9edf2; }
.gcd-mat-meta { padding: 6px 8px; font-size: 11px; color: var(--gcd-muted); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcd-mat-ops {
    position: absolute;
    left: 6px; right: 6px; bottom: 6px;
    display: flex; gap: 4px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .15s ease, transform .15s ease;
}
.gcd-mat-cell:hover .gcd-mat-ops { opacity: 1; transform: none; }
.gcd-mat-op {
    flex: 1;
    padding: 5px 2px;
    border: 0;
    border-radius: 6px;
    background: rgba(15, 23, 42, .72);
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
}
.gcd-mat-op:hover { background: var(--gcd-primary); }
.gcd-mat-op-danger:hover { background: var(--gcd-danger); }
.gcd-mat-empty, .gcd-mat-loading { padding: 34px 0; text-align: center; color: var(--gcd-muted); font-size: 13px; }
.gcd-mat-end { margin-top: 10px; text-align: center; color: var(--gcd-muted); font-size: 12px; padding: 4px 8px; }

/* 素材分页：上一页 / 页码 / 下一页 */
.gcd-mat-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--gcd-border);
}
.gcd-mat-page-btn {
    flex: 0 0 auto;
    min-width: 0;                /* flex 子项默认 min-width:auto，长文本会把整行撑破 */
    padding: 6px 12px;
    border: 1px solid var(--gcd-border);
    border-radius: 7px;
    background: var(--gcd-panel);
    color: var(--gcd-text);
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.gcd-mat-page-btn:hover:not(:disabled) {
    border-color: var(--gcd-primary);
    color: var(--gcd-primary);
    background: var(--gcd-primary-weak);
}
.gcd-mat-page-btn:disabled { opacity: .45; cursor: not-allowed; }
.gcd-mat-pageinfo {
    flex: 1 1 auto;
    min-width: 0;                /* 同 .gcd-mat-page-btn：允许收缩，避免窄栏横向溢出 */
    text-align: center;
    font-size: 12px;
    color: var(--gcd-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- 素材库 · 放大浏览（整屏弹窗 · 瀑布流无限滚动） ---------- */
/* 层级略高于普通内容，但低于自定义确认弹窗（.gcd-confirm=300），这样「删除前查引用」的确认框能浮在上方 */
.gcd-mat-modal {
    z-index: 200;
    /* 关键：遮罩本身不滚动，且阻止滚动链传递到背后的主页面（配合 .gcd-mat-modal-body 的 overscroll-behavior） */
    overflow: hidden;
    overscroll-behavior: contain;
}
.gcd-mat-modal-box {
    position: relative;            /* 浮层关闭按钮绝对定位的锚点 */
    width: 98vw;
    max-width: 98vw;
    max-height: 98vh;
    /* 复用 .gcd-modal-box 的卡片外观，这里只需覆盖尺寸（最大化利用屏幕） */
}
/* 浮动关闭按钮：不占布局空间，悬在右上角，省去整条标题栏 */
.gcd-mat-modal-close {
    position: absolute;
    top: 8px; right: 10px;
    z-index: 3;
    width: 30px; height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, .42);
    color: #fff;
    font-size: 20px; line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: background .15s ease;
}
.gcd-mat-modal-close:hover { background: rgba(15, 23, 42, .72); }
/* 真正的滚动容器：弹窗内所有内容（瀑布流 + 加载中 + 到底提示）都在这滚动；
   overscroll-behavior:contain 让滚到顶/底时不会把滚动“链”传到背后主页面 */
.gcd-mat-modal-body {
    display: block;
    min-height: 0;
    flex: 1 1 auto;
    padding: 30px 18px 18px;      /* 顶部留白给浮层关闭按钮，避免压到第一排图片 */
    overflow-y: auto;
    overscroll-behavior: contain;
}
/* 放大态：固定宽高的均匀网格（每格同尺寸、缩略图按 4:3 统一裁切，与左栏素材面板同风格）。
   「加载」仍沿用瀑布流无限滚动：滚到距底两屏内自动拉下一页并追加（逻辑在 v2.js，此处只改视觉）。
   用 grid auto-fill 让列数随屏宽自适应，但每格宽高一致，不出现高低错落。 */
.gcd-mat-grid-exp {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(186px, 1fr));
    gap: 12px;
}
.gcd-mat-cell-exp {
    display: block;
    width: 100%;
}
/* 缩略图固定 4:3；默认 cover 裁切填满，鼠标经过切 contain 看全图（放大视图显式声明，不依赖基础类继承） */
.gcd-mat-cell-exp .gcd-mat-thumb {
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: cover;
    background: #f1f2f4;
}
.gcd-mat-cell-exp .gcd-mat-thumb:hover {
    object-fit: contain;
    background: #e9edf2;
}
.gcd-mat-cell-exp .gcd-mat-meta { font-size: 10.5px; }
/* 瀑布流到底提示 */
.gcd-mat-end {
    text-align: center;
    color: var(--gcd-muted);
    font-size: 12px;
    padding: 10px 0 4px;
}
/* 打开放大弹窗时锁定背后主页面滚动（双保险，配合 overscroll-behavior） */
body.gcd-noscroll { overflow: hidden; }

/* ---------- 右侧 AI 创作栏 ---------- */
.gcd-pane-ai {
    flex: 0 0 328px;
    width: 328px;
    display: flex;
    flex-direction: column;
    background: var(--gcd-panel);
    border: 1px solid var(--gcd-border);
    border-radius: 12px;
    overflow: hidden;
}
.gcd-pane-ai.is-collapsed { flex: 0 0 0; width: 0; border: none; opacity: 0; pointer-events: none; }
.gcd-ai-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--gcd-border);
    background: linear-gradient(135deg, #fff, #fdf2f8);
}
.gcd-ai-title { font-size: 14px; font-weight: 700; color: var(--gcd-text); }
.gcd-ai-title .fa-solid { color: #ec4899; margin-right: 6px; }
.gcd-ai-mark {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 999px;
    background: #fce7f3;
    color: #db2777;
    margin-left: 2px;
}
.gcd-ai-fast { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--gcd-muted); }
.gcd-ai-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.gcd-ai-speed {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: 7px;
    background: #f1f2f4;
    margin-right: 6px;
}
.gcd-ai-speed button {
    border: 0;
    background: transparent;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 5px;
    color: var(--gcd-muted);
    cursor: pointer;
}
.gcd-ai-speed button.on { background: #fff; color: var(--gcd-primary); box-shadow: 0 1px 2px rgba(15,30,60,.12); }
.gcd-ai-tools .gcd-ico-btn {
    border: 0;
    background: transparent;
    width: 28px; height: 28px;
    border-radius: 7px;
    color: var(--gcd-muted);
    cursor: pointer;
    font-size: 14px;
}
.gcd-ai-tools .gcd-ico-btn:hover { background: #f1f2f4; color: var(--gcd-text); }
/* ---------- AI 栏 Tab（功能 / 结果） ---------- */
.gcd-ai-tabs {
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--gcd-border);
    background: #fff;
}
.gcd-ai-tab {
    position: relative;
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 6px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: #f4f5f7;
    color: var(--gcd-muted);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.gcd-ai-tab .fa-solid { font-size: 12px; }
.gcd-ai-tab:hover:not([disabled]) { background: #fdf2f8; color: #db2777; }
.gcd-ai-tab.on { background: #fff; color: #db2777; border-color: #f9a8d4; box-shadow: 0 1px 3px rgba(236,72,153,.12); }
.gcd-ai-tab[disabled] { opacity: .45; cursor: not-allowed; }
.gcd-ai-tab-dot {
    position: absolute; top: 5px; right: 8px;
    width: 7px; height: 7px; border-radius: 50%;
    background: #ec4899; box-shadow: 0 0 0 2px #fff;
}
.gcd-ai-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 14px; }
.gcd-ai-body::-webkit-scrollbar { width: 5px; }
.gcd-ai-body::-webkit-scrollbar-thumb { background: #d7dbe0; border-radius: 5px; }
.gcd-ai-tip { margin: 0 0 10px; font-size: 11px; color: var(--gcd-muted); line-height: 1.5; }
.gcd-ai-group { margin-bottom: 15px; }
.gcd-ai-group-h {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--gcd-muted);
    letter-spacing: .4px;
}
.gcd-ai-group-h i { color: #ec4899; font-size: 11px; }
.gcd-ai-group-h::after { content: ''; flex: 1; height: 1px; background: var(--gcd-border); }
.gcd-ai-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 6px;
    padding: 9px 10px;
    border: 1px solid var(--gcd-border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color .12s ease, background .12s ease, transform .12s ease, box-shadow .12s ease;
}
.gcd-ai-item:last-child { margin-bottom: 0; }
.gcd-ai-item:hover { border-color: #f9a8d4; background: #fdf2f8; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(236, 72, 153, .10); }
.gcd-ai-item:active { transform: none; }
.gcd-ai-item > i {
    flex: 0 0 auto;
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    color: #ec4899;
    background: #fce7f3;
}
.gcd-ai-item-t { flex: 1; min-width: 0; }
.gcd-ai-item-t b { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gcd-text); }
.gcd-ai-item-t b .gcd-chip-tiny { font-size: 10px; color: var(--gcd-muted); background: #f1f2f4; padding: 0 6px; border-radius: 999px; font-weight: 500; }
.gcd-ai-item-t small { display: block; margin-top: 1px; font-size: 11px; color: var(--gcd-muted); line-height: 1.5; }

/* ---------- AI 结果面板（整栏，由 Tab 控制显隐） ---------- */
.gcd-ai-results {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
    flex-direction: column;
    background: #fafbfc;
}
.gcd-ai-results-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--gcd-border);
}
.gcd-ai-results-t { flex: 1; min-width: 0; }
.gcd-ai-results-t b { font-size: 13px; color: var(--gcd-text); }
.gcd-ai-results-t small { font-size: 11px; color: var(--gcd-muted); margin-left: 6px; }
.gcd-ai-results-close { border: 0; background: transparent; color: var(--gcd-muted); font-size: 20px; line-height: 1; cursor: pointer; }
.gcd-ai-results-close:hover { color: var(--gcd-text); }
.gcd-ai-results-list { flex: 1 1 auto; overflow-y: auto; padding: 10px 14px; }
.gcd-ai-results-list.gcd-ai-list--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; }
.gcd-ai-loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 0; color: var(--gcd-muted); font-size: 13px; }
.gcd-ai-loading .gcd-spinner { width: 26px; height: 26px; }
/* AI 正在创作（轮询中）状态 */
.gcd-ai-creating { gap: 8px; padding: 30px 12px; }
.gcd-ai-creating .gcd-spinner { width: 30px; height: 30px; }
.gcd-ai-creating-t { font-size: 14px; font-weight: 600; color: var(--gcd-text, #333); letter-spacing: .3px; }
.gcd-ai-creating-s { font-size: 12px; color: var(--gcd-muted); animation: gcd-creating-breathe 1.8s ease-in-out infinite; }
@keyframes gcd-creating-breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.gcd-ai-result {
    position: relative;
    border: 1px solid var(--gcd-border);
    border-radius: 10px;
    padding: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.gcd-ai-result.on { border-color: #ec4899; box-shadow: 0 0 0 3px rgba(236, 72, 153, .14); }
.gcd-ai-result-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.gcd-ai-radio {
    flex: 0 0 auto;
    width: 16px; height: 16px;
    border: 2px solid var(--gcd-border);
    border-radius: 50%;
    position: relative;
}
.gcd-ai-result.on .gcd-ai-radio { border-color: #ec4899; }
.gcd-ai-result.on .gcd-ai-radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: #ec4899; }
.gcd-ai-result-tag {
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--gcd-muted);
    margin-left: auto;
}
.gcd-ai-result-tag.demo { background: #fef3c7; color: #92400e; }
.gcd-ai-result-body { font-size: 12.5px; line-height: 1.75; color: var(--gcd-text); word-break: break-word; }
.gcd-ai-result-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; margin-bottom: 6px; display: block; background: #f1f2f4; }
.gcd-ai-result-actions { display: flex; gap: 6px; margin-top: 9px; justify-content: flex-end; }
.gcd-ai-result-actions .gcd-btn { padding: 4px 12px; font-size: 12px; }
.gcd-ai-results-foot { flex: 0 0 auto; display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--gcd-border); }
.gcd-ai-results-foot .gcd-btn { flex: 1; }
.gcd-ai-note { font-size: 12px; color: var(--gcd-muted); padding: 8px 2px; line-height: 1.6; }
.gcd-ai-req { margin: 0 0 10px; }
.gcd-ai-req .gcd-textarea { width: 100%; min-height: 64px; font-size: 13px; }

/* ---------- Tab 面板显隐 ---------- */
.gcd-ai-panel { flex: 1 1 auto; min-height: 0; }
.gcd-ai-panel:not(.on) { display: none; }
.gcd-ai-body.gcd-ai-panel.on { display: block; }
.gcd-ai-results.gcd-ai-panel.on { display: flex; }
/* 结果面板顶部提示条（如“标题只会写入标题栏”） */
.gcd-ai-results > .gcd-ai-note {
    flex: 0 0 auto;
    padding: 7px 14px;
    font-size: 11.5px;
    line-height: 1.5;
    color: #92400e;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
}
/* 空态 / 提示态 */
.gcd-ai-empty { padding: 34px 18px; text-align: center; color: var(--gcd-muted); font-size: 12.5px; line-height: 1.8; }
.gcd-ai-empty .fa-solid { display: block; font-size: 26px; color: #e5e7eb; margin-bottom: 10px; }
/* ---------- 自定义指令（可折叠） ---------- */
.gcd-ai-custom { flex: 0 0 auto; border-top: 1px solid var(--gcd-border); background: #fff; }
.gcd-ai-custom-toggle {
    width: 100%;
    display: flex; align-items: center; gap: 7px;
    padding: 9px 14px;
    border: 0; background: transparent;
    font-size: 12.5px; font-weight: 600; color: var(--gcd-text);
    cursor: pointer;
}
.gcd-ai-custom-toggle:hover { color: #db2777; }
.gcd-ai-custom-toggle > .fa-terminal { color: #ec4899; font-size: 12px; }
.gcd-ai-custom-arrow { margin-left: auto; font-size: 11px; color: var(--gcd-muted); transition: transform .15s ease; }
.gcd-ai-custom.open .gcd-ai-custom-arrow { transform: rotate(180deg); }
.gcd-ai-custom-body { padding: 0 14px 12px; }
.gcd-ai-custom-body .gcd-textarea { width: 100%; min-height: 76px; font-size: 13px; resize: vertical; }
.gcd-ai-custom-foot { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.gcd-ai-custom-count { font-size: 11px; color: var(--gcd-muted); margin-right: auto; }
.gcd-ai-custom-foot .gcd-btn { padding: 6px 14px; font-size: 12.5px; }

/* ---------- 选区上下文菜单（纯 AI） ---------- */
.gcd-ctx { position: fixed; z-index: 130; min-width: 186px; padding: 6px; background: #fff; border: 1px solid var(--gcd-border); border-radius: 10px; box-shadow: 0 10px 30px rgba(17, 24, 39, .2); }
.gcd-ctx-head { display: flex; align-items: center; gap: 6px; padding: 7px 10px 5px; font-size: 11px; font-weight: 700; color: var(--gcd-primary); }
.gcd-ctx-head i { font-size: 11px; }
.gcd-ctx-close {
    margin-left: auto;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--gcd-muted);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.gcd-ctx-close:hover { background: #f1f2f4; color: var(--gcd-text); }
.gcd-ctx-sep { height: 1px; background: var(--gcd-border); margin: 4px 6px; }
.gcd-ctx-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    background: transparent;
    border-radius: 7px;
    font-size: 13px;
    color: var(--gcd-text);
    cursor: pointer;
    text-align: left;
}
.gcd-ctx-item:hover { background: #fdf2f8; color: #db2777; }
.gcd-ctx-item i { width: 16px; text-align: center; font-size: 12px; color: #ec4899; }
.gcd-ctx-item small { color: var(--gcd-muted); font-size: 11px; margin-left: auto; }

/* ---------- 通用确认弹窗（替换原生 confirm） ---------- */
.gcd-confirm { z-index: 300; }
.gcd-confirm-box { max-width: 420px; padding: 22px 24px 20px; border-radius: 12px; }
.gcd-confirm-title { font-size: 15px; font-weight: 700; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.gcd-confirm-title i { color: var(--gcd-primary); }
.gcd-confirm-msg { font-size: 13px; color: var(--gcd-muted); line-height: 1.7; margin: 0 0 18px; word-break: break-word; }
.gcd-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.gcd-confirm-actions .gcd-btn { min-width: 84px; }

/* ---------- 预览页：设备切换 ---------- */
.gcd-devbar {
    position: fixed;
    top: 14px; left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px;
    background: rgba(17, 24, 39, .9);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, .35);
    backdrop-filter: blur(6px);
}
.gcd-devbtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    color: #cbd5e1;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}
.gcd-devbtn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.gcd-devbtn.on { background: var(--gcd-primary); color: #fff; }
.gcd-dev-stage { width: 100%; display: flex; justify-content: center; padding: 74px 16px 48px; }
.gcd-dev-frame {
    background: #fff;
    border: 1px solid var(--gcd-border);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(17, 24, 39, .16);
    overflow: auto;
    transition: width .22s ease;
}
.gcd-dev-stage .gcd-preview {
    max-width: none;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}
.gcd-dev-phone .gcd-dev-frame { width: 394px; }
.gcd-dev-pad   .gcd-dev-frame { width: 768px; }
.gcd-dev-desktop .gcd-dev-frame { width: 100%; max-width: 1000px; }
.gcd-devbar-behind { display: none; }

/* ---------- AI 栏收起后的展开把手 ---------- */
.gcd-ai-reopen {
    position: fixed; right: 0; top: 50%;
    transform: translateY(-50%);
    z-index: 88;
    display: none;
    flex-direction: column; align-items: center; gap: 4px;
    padding: 12px 6px;
    border: 0; cursor: pointer;
    background: var(--gcd-primary); color: #fff;
    border-radius: 8px 0 0 8px;
    font-size: 11px;
    box-shadow: 0 4px 14px rgba(17, 24, 39, .3);
}
.gcd-ai-reopen i { font-size: 14px; }
.gcd-ai-reopen.show { display: flex; }
/* AI 栏把手统一为粉色主题（与 AI 创作区一致） */
.gcd-ai-reopen { background: #ec4899; }
.gcd-ai-reopen:hover { background: #db2777; }
/* 左栏收起后的展开把手（左缘，与右缘 AI 把手对称） */
.gcd-left-reopen {
    position: fixed; left: 0; top: 50%;
    transform: translateY(-50%);
    z-index: 88;
    display: none;
    flex-direction: column; align-items: center; gap: 4px;
    padding: 12px 6px;
    border: 0; cursor: pointer;
    background: var(--gcd-primary); color: #fff;
    border-radius: 0 8px 8px 0;
    font-size: 11px;
    box-shadow: 0 4px 14px rgba(17, 24, 39, .3);
}
.gcd-left-reopen i { font-size: 14px; }
.gcd-left-reopen.show { display: flex; }
@media (max-width: 960px) { .gcd-left-reopen { display: none !important; } }
/* AI 区按钮统一粉色主题（原蓝色 primary 与 AI 红粉调不搭） */
.gcd-pane-ai .gcd-btn.gcd-btn-primary { background: #ec4899; border-color: #ec4899; color: #fff; }
.gcd-pane-ai .gcd-btn.gcd-btn-primary:hover { background: #db2777; border-color: #db2777; }
.gcd-pane-ai .gcd-btn.gcd-btn-primary:disabled { background: #f9a8d4; border-color: #f9a8d4; }
.gcd-pane-ai .gcd-btn.gcd-btn-ai-ghost { color: #be185d; border-color: #fbcfe8; background: #fdf2f8; }
.gcd-pane-ai .gcd-btn.gcd-btn-ai-ghost:hover { background: #fce7f3; border-color: #f9a8d4; }

/* ---------- 全局轻提示 -------- */
.gcd-toast {
    position: fixed; left: 50%; bottom: 88px; z-index: 900;
    transform: translateX(-50%);
    display: none;
    max-width: 78vw;
    padding: 9px 16px;
    border-radius: 8px;
    background: rgba(17, 24, 39, .92); color: #fff;
    font-size: 13px; line-height: 1.5;
    box-shadow: 0 6px 20px rgba(17, 24, 39, .3);
}

/* ---------- 移动端：底部固定 ActionBar；左右栏为抽屉；工具栏固定顶部 ----------
   桌面端整体隐藏；.gcd-mob-sheet（导航/操作竖排列）的实体样式只在下面媒体查询里，
   不在这里补 display:none 的话，桌面端会退化为普通块级元素，链接若隐若现地露在页面底部 */
.gcd-bottom-bar, .gcd-edit-toolbar-head, .gcd-mob-sheet { display: none; }
@media (max-width: 960px) {
    /* 顶部格式工具栏折叠高度（含表头一行），左右抽屉/遮罩从下方让开 */
    .gcd-page-edit { --gcd-mob-tb: 78px; }

    /* 隐藏顶部导航条（其按钮收纳进底部 ActionBar「导航」竖排列） */
    .gcd-page-edit .gcd-topbar { display: none; }

    .gcd-page-edit .gcd-main { height: auto; overflow: visible; padding: 0 0 118px; }
    .gcd-page-edit #gcd-form { display: block; height: auto; min-height: 0; }
    .gcd-workspace { display: block; height: auto; flex: none; }
    .gcd-workspace .gcd-split { height: auto; min-height: 0; flex-direction: column; }
    .gcd-workspace .gcd-divider { display: none; }
    .gcd-workspace .gcd-pane-right { min-height: 60vh; }

    /* 移动端：编辑器填满可视高度，消除正文下方大片空白（之前被 min-height 460/60vh 卡住、main 又是 height:auto） */
    .gcd-page-edit .gcd-main { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
    .gcd-page-edit #gcd-form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
    .gcd-edit-toolbar { flex: 0 0 auto; }
    .gcd-workspace { flex: 1 1 auto; min-height: 0; display: flex; }
    .gcd-workspace .gcd-split { flex: 1 1 auto; min-height: 0; flex-direction: column; }
    .gcd-workspace .gcd-pane-right { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
    .gcd-doc-scroll { flex: 1 1 auto; min-height: 0; }

    /* ---- 顶部格式工具栏：固定顶部、默认收成一行，点「展开」折行 ---- */
    .gcd-edit-toolbar {
        position: sticky; top: 0; z-index: 87;
        background: #fff;
        border-bottom: 1px solid var(--gcd-border);
        margin: 0 0 10px;
    }
    .gcd-edit-toolbar-head { display: flex; align-items: center; justify-content: space-between; padding: 7px 12px 0; }
    .gcd-edit-toolbar-title { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--gcd-muted); }
    .gcd-edit-toolbar-title i { color: var(--gcd-primary); }
    .gcd-edit-toolbar-toggle {
        display: inline-flex; align-items: center; gap: 4px;
        border: 0; border-radius: 999px; background: #eef0f4; color: #374151;
        padding: 4px 11px; font-size: 11px; cursor: pointer;
    }
    .gcd-edit-toolbar-toggle i { font-size: 10px; transition: transform .15s ease; }
    body.gcd-tb-open .gcd-edit-toolbar-toggle i { transform: rotate(180deg); }
    body.gcd-tb-open .gcd-edit-toolbar-toggle { color: var(--gcd-primary); background: #eef2ff; }

    .gcd-page-edit #gcd-toolbar {
        position: static; box-shadow: none; margin: 0; border: 0;
        display: flex; flex-wrap: nowrap; overflow-x: auto; align-items: center;
        gap: 5px; padding: 7px 10px 9px;
        max-height: 44px;
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .gcd-page-edit #gcd-toolbar::-webkit-scrollbar { display: none; }
    body.gcd-tb-open .gcd-page-edit #gcd-toolbar { flex-wrap: wrap; overflow: visible; max-height: none; }

    /* ---- 左右栏：抽屉从工具栏下方开始 ---- */
    body.gcd-mobile-mode .gcd-workspace .gcd-pane-left {
        position: fixed; top: var(--gcd-mob-tb); left: 0; bottom: 0;
        width: min(82vw, 340px);
        max-width: none; max-height: none; height: auto;
        z-index: 95;
        background: var(--gcd-panel);
        transform: translateX(-105%);
        transition: transform .25s ease;
        border-radius: 0 12px 12px 0;
        border-width: 1px 1px 1px 0;
        box-shadow: 0 10px 30px rgba(17,24,39,.25);
        overflow: hidden;
        display: flex;
    }
    body.gcd-mobile-mode .gcd-workspace .gcd-pane-left.gcd-drawer-open { transform: translateX(0); }
    body.gcd-mobile-mode .gcd-workspace .gcd-pane-ai {
        position: fixed; top: var(--gcd-mob-tb); right: 0; bottom: 0;
        width: min(88vw, 360px);
        flex: none; max-width: none; z-index: 95;
        transform: translateX(105%);
        transition: transform .25s ease;
        border-radius: 12px 0 0 12px;
        box-shadow: 0 10px 30px rgba(17,24,39,.25);
        opacity: 1; pointer-events: auto;
    }
    body.gcd-mobile-mode .gcd-workspace .gcd-pane-ai.gcd-drawer-open { transform: translateX(0); }
    .gcd-drawer-mask { position: fixed; inset: var(--gcd-mob-tb) 0 0; background: rgba(15,23,42,.4); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
    .gcd-drawer-mask.show { opacity: 1; pointer-events: auto; }

    /* ---- 底部固定 ActionBar ---- */
    .gcd-bottom-bar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 84;
        display: flex; align-items: stretch;
        height: calc(58px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
        border-top: 1px solid var(--gcd-border);
        box-shadow: 0 -2px 12px rgba(17,24,39,.05);
    }
    .gcd-bottom-bar .gcd-bb-b {
        flex: 1; min-width: 0;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        border: 0; background: transparent; color: #4b5563;
        font-size: 10px; cursor: pointer;
    }
    .gcd-bottom-bar .gcd-bb-b i { font-size: 18px; margin-bottom: 1px; transition: transform .1s ease; }
    .gcd-bottom-bar .gcd-bb-b:active i { transform: scale(.9); }
    .gcd-bottom-bar .gcd-bb-b.on { color: var(--gcd-primary); font-weight: 600; }

    /* ---- 底部 ActionBar 竖排列（导航 / 操作）通用 ---- */
    .gcd-mob-sheet {
        display: block; /* 桌面端上面统一隐藏，移动端媒体查询里放开 */
        position: fixed; left: 8px; right: 8px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 86;
        background: #fff; border: 1px solid var(--gcd-border); border-radius: 14px;
        box-shadow: 0 -8px 30px rgba(17,24,39,.18);
        padding: 6px; max-height: 55vh; overflow-y: auto;
        transform: translateY(14px); opacity: 0; pointer-events: none;
        transition: transform .2s ease, opacity .2s ease;
    }
    .gcd-mob-sheet.gcd-mob-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .gcd-ms-item {
        display: flex; align-items: center; gap: 10px; width: 100%;
        padding: 12px; box-sizing: border-box;
        border: 0; border-radius: 9px; background: transparent;
        font-size: 14px; color: var(--gcd-text); text-align: left; cursor: pointer;
        text-decoration: none;
    }
    .gcd-ms-item i { width: 20px; text-align: center; color: var(--gcd-primary); font-size: 15px; }
    .gcd-ms-item:hover { background: #f5f6fa; }
    .gcd-ms-item + .gcd-ms-item { border-top: 1px solid #f0f1f4; }

    /* ---- 操作列：复用 .gcd-actions 改为竖排 ---- */
    .gcd-col-tools-desktop { display: none; }
    .gcd-page-edit .gcd-actions {
        position: fixed; left: 8px; right: 8px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 86;
        display: flex; flex-direction: column; align-items: stretch; gap: 4px;
        padding: 6px;
        background: #fff; border: 1px solid var(--gcd-border); border-radius: 14px;
        box-shadow: 0 -8px 30px rgba(17,24,39,.18);
        max-height: 55vh; overflow-y: auto;
        transform: translateY(14px); opacity: 0; pointer-events: none;
        transition: transform .2s ease, opacity .2s ease;
    }
    .gcd-page-edit .gcd-actions.gcd-mob-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .gcd-page-edit .gcd-actions .gcd-actions-info { display: none; }
    .gcd-page-edit .gcd-actions .gcd-btn,
    .gcd-page-edit .gcd-actions a {
        display: flex; align-items: center; justify-content: center; gap: 8px;
        width: 100%; padding: 11px 12px; margin: 0; font-size: 14px;
        border-radius: 9px; text-decoration: none; box-sizing: border-box;
    }
    .gcd-page-edit .gcd-actions #gcd-status { display: none; }

    .gcd-dev-phone .gcd-dev-frame { width: 100%; }
    .gcd-dev-pad .gcd-dev-frame { width: 100%; }
}

/* =====================================================================
 * great_cdn v2.x · 整站通用现代化（所有页面，含列表/预览/提示）
 * 在 app.css 之后加载，仅“新增点 + 覆盖”，克制而轻盈，不破坏既有类/ID。
 * 注意：上方 .gcd-page-edit 的规则仅作用于编辑页，不影响本站点。
 * ===================================================================== */

/* ---------- 全局：字体更清晰、底色更轻盈 ---------- */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background: #f5f6fa;
}

/* ---------- 顶栏：吸顶 + 轻毛玻璃，更轻盈 ---------- */
.gcd-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, .84);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #e9ebf0;
}
.gcd-topbar-inner { height: 60px; gap: 16px; }
.gcd-brand { font-size: 17px; letter-spacing: .3px; }
.gcd-brand span {
    background: #eef2ff;
    color: #4f46e5;
    border: 1px solid #e0e7ff;
}
/* 顶栏导航项：从普通链接升级为精致的紧凑药丸 */
.gcd-topbar-inner > a:not(.gcd-brand) {
    padding: 7px 13px;
    border-radius: 8px;
    color: #4b5563;
    font-size: 14px;
    transition: color .12s ease, background .12s ease;
}
.gcd-topbar-inner > a:not(.gcd-brand):hover { background: #f1f3f7; color: #111827; text-decoration: none; }
.gcd-page-list   .gcd-topbar-inner > a:not(.gcd-brand)[href$="index.php"],
.gcd-page-edit   .gcd-topbar-inner > a:not(.gcd-brand)[href$="edit.php"] {
    background: #eef2ff;
    color: #2563eb;
    font-weight: 600;
}

/* ---------- 通用按钮：更柔和的圆角与光影 ---------- */
.gcd-btn {
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 14px;
    border-color: #e2e6ec;
    transition: border-color .14s ease, color .14s ease, background .14s ease, box-shadow .14s ease, transform .1s ease;
}
.gcd-btn:hover { border-color: #cfd3da; }
.gcd-btn-primary {
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .22);
}
.gcd-btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; box-shadow: 0 6px 16px rgba(37, 99, 235, .28); transform: translateY(-1px); }
.gcd-btn-danger { border-color: #f3ced0; background: #fff5f5; }
.gcd-btn:disabled { transform: none; box-shadow: none; }

/* ---------- 输入框/下拉：圆角 + 聚焦光圈 ---------- */
.gcd-input, .gcd-textarea, select.gcd-input {
    border-radius: 8px;
    border-color: #e2e6ec;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.gcd-input:focus, .gcd-textarea:focus, select.gcd-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
select.gcd-input { cursor: pointer; }

/* ---------- 提醒条：更柔和 ---------- */
.gcd-alert { border-radius: 10px; }

/* ---------- 筛选栏：更轻盈的卡片 ---------- */
.gcd-filter {
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(17, 24, 39, .04);
    border-color: #e9ebf0;
}

/* ---------- 列表工具条 ---------- */
.gcd-toolbar .gcd-input { min-width: 120px; }

/* ---------- 表格：更精致的卡片化 ---------- */
.gcd-table {
    border-radius: 12px;
    border-color: #e9ebf0;
    box-shadow: 0 1px 3px rgba(17, 24, 39, .04);
    overflow: hidden;
}
.gcd-table th {
    background: #f7f8fb;
    color: #6b7280;
    letter-spacing: .3px;
    font-size: 12.5px;
}
.gcd-table th, .gcd-table td { padding: 12px 14px; }
.gcd-table td { border-color: #f0f1f4; font-size: 13.5px; }
.gcd-table tr:hover td { background: #f6f8fd; }
.gcd-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: #2563eb; cursor: pointer; }

.gcd-col-check { width: 34px; }
.gcd-title { color: #1f2328; font-weight: 600; }
.gcd-title:hover { color: #2563eb; }
.gcd-tags {
    color: #6b7280;
    font-size: 12px;
    margin-top: 3px;
}
.gcd-muted { color: #9aa1ab; }

/* 状态标签：更轻盈的胶囊 */
.gcd-status { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.gcd-status-0 { background: #f1f3f7; color: #6b7280; }
.gcd-status-1 { background: #e8f7ef; color: #15803d; }
.gcd-status-2 { background: #fff4e6; color: #c2410c; }

/* 操作链接：紧凑小按钮，代替密集文本链 */
.gcd-ops a {
    display: inline-block;
    margin: 2px 4px 2px 0;
    padding: 4px 10px;
    border: 1px solid #e6e8ee;
    border-radius: 6px;
    background: #fff;
    color: #4b5563;
    font-size: 12.5px;
    text-decoration: none;
    transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.gcd-ops a:hover { border-color: #2563eb; color: #2563eb; background: #f4f7ff; }
.gcd-ops a.gcd-danger { color: #dc2626; }
.gcd-ops a.gcd-danger:hover { border-color: #dc2626; background: #fff5f5; color: #dc2626; }

/* ---------- 分页：更柔和 ---------- */
.gcd-pager a {
    border-radius: 8px;
    border-color: #e2e6ec;
    padding: 6px 12px;
    transition: border-color .12s ease, background .12s ease;
}
.gcd-pager a:hover { border-color: #2563eb; color: #2563eb; }
.gcd-pager a.on { background: #2563eb; border-color: #2563eb; }

/* ---------- 列表页移动端：过滤/工具条纵向铺开，表格转卡片 ---------- */
@media (max-width: 860px) {
    .gcd-topbar-inner { height: 56px; gap: 8px; padding: 0 12px; }
    .gcd-topbar-inner > a:not(.gcd-brand) { padding: 6px 9px; font-size: 13px; }
    .gcd-main { padding: 16px 12px 40px; }

    .gcd-filter { flex-direction: column; align-items: stretch; padding: 12px; }
    .gcd-filter .gcd-input, .gcd-filter .gcd-btn { width: 100%; min-width: 0; }
    .gcd-filter .gcd-date-sep { text-align: center; }

    .gcd-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
    .gcd-toolbar > div { display: flex; gap: 8px; }
    .gcd-toolbar > div .gcd-input { flex: 1; }
    .gcd-toolbar .gcd-btn { text-align: center; }

    .gcd-table { display: block; border: 0; box-shadow: none; background: transparent; }
    .gcd-table thead { display: none; }
    .gcd-table tbody { display: block; }
    .gcd-table tr {
        display: flex;
        flex-direction: column;
        position: relative;
        margin-bottom: 10px;
        padding: 12px 14px 10px 14px;
        background: #fff;
        border: 1px solid #e9ebf0;
        border-radius: 12px;
        box-shadow: 0 1px 2px rgba(17, 24, 39, .03);
    }
    .gcd-table tr:hover td { background: transparent; }
    .gcd-table td {
        display: block;
        border: none;
        padding: 4px 0;
        white-space: normal !important;
    }
    .gcd-table td:first-child { position: absolute; top: 14px; right: 14px; padding: 0; }
    .gcd-ops { margin-top: 8px; }
    .gcd-table td:nth-child(2) { order: 2; }  /* 作者/时间 */
    .gcd-table td:nth-child(3) { order: 1; padding-right: 40px; } /* 标题 */
    .gcd-table td:nth-child(4) { order: 3; }  /* 备注 */
    .gcd-table td:nth-child(5) { order: 4; }
    .gcd-table td:nth-child(3) .gcd-title { font-size: 16px; line-height: 1.4; }
    .gcd-table .gcd-muted { font-size: 12px; }
    .gcd-table .gcd-remark > div { white-space: normal; }
    .gcd-pager { justify-content: center; }
}