/* items.html 页面样式：自模板内联 <style> 原样抽离（内容未改动） */
        * { box-sizing: border-box; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            background: #f7fafc;
            margin: 0;
            padding: 10px 6px;
            color: #333;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }
        .container {
            margin: 0 auto;
        }
        .community-publish-btn {
            margin-left: auto;
            min-height: 36px;
            padding: 0 14px;
            border: none;
            border-radius: 18px;
            background: var(--primary);
            color: #fff;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            -webkit-tap-highlight-color: transparent;
            transition: background 0.15s, transform 0.1s;
        }
        .community-publish-btn:hover { background: var(--primary-2); }
        .community-publish-btn:active { transform: scale(0.92); }
        /* 上面的 display:flex 会盖掉 hidden 属性的 UA 默认 display:none，
           显式兜底，保证游客（items.js syncCurrentUser 置 hidden）看不到发布入口 */
        .community-publish-btn[hidden] { display: none; }
        h1 {
            text-align: center;
            color: #333;
            margin-bottom: 12px;
            margin-top: 0;
            font-size: 1.15rem;
        }
        .toolbar {
            display: flex;
            gap: 8px;
            margin-bottom: 10px;
        }
/* .items-grid / .item-card* / .item-post-meta / .item-author /
   .empty/.loading → 已抽到 static/css/itemcard.css 全站共享；本文件保留 items.html
   页面专属的工具栏、候选人搜索与弹窗表单等。

           列表分页已切换为滚动加载（js/util/infinitescroll.js）：容器底部哨兵
           元素在用户视口接近时自动拉下一页，不再需要分页栏。 */
        .pagination { display: none; }   /* 旧分页节点残留兜底（已从模板移除） */
        /* 滚动加载状态：浅灰文字、居中、grid-column: 1/-1 占满卡片网格 */
        .inf-scroll-placeholder,
        .inf-scroll-loading,
        .inf-scroll-end,
        .inf-scroll-error {
            text-align: center;
            color: #a0aec0;
            font-size: 0.85rem;
            padding: 18px 0;
            grid-column: 1 / -1;
        }
        .inf-scroll-error { color: #e53e3e; }
        .inf-scroll-end { color: #cbd5e0; font-size: 0.78rem; }
        /* 收窄后 .admin-toolbar button（0,1,1）会盖过裸 .btn-secondary（0,1,0），
           这里补回次级按钮的灰底，保持工具条原有视觉 */
        .admin-toolbar button.btn-secondary {
            background: #e2e8f0;
            color: #2d3748;
        }
        .admin-toolbar button.btn-secondary:hover {
            background: #cbd5e0;
        }
        .btn-secondary {
            background: #e2e8f0;
            color: #2d3748;
        }
        .btn-secondary:hover {
            background: #cbd5e0;
        }
        .btn-danger {
            background: #fc8181;
            color: #fff;
        }
        .btn-danger:hover {
            background: #f56565;
        }
        .message {
            padding: 8px 12px;
            border-radius: 6px;
            margin-bottom: 10px;
            font-size: 0.9rem;
        }
        .message.success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        .message.error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
        /* 弹窗全屏规则统一由 mobile-shell.css 接管（.modal-overlay / .modal-overlay > .modal） */
        .modal h3 {
            margin-top: 0;
            margin-bottom: 14px;
            color: #5a67d8;
        }
        .form-group {
            margin-bottom: 12px;
            display: flex;
            flex-direction: column;
        }
        .form-group label {
            font-weight: 600;
            font-size: 0.85rem;
            margin-bottom: 4px;
            color: #4a5568;
        }
        .form-group input, .form-group textarea, .form-group select {
            padding: 8px 10px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 16px;  /* iOS 上输入控件字号小于 16px 聚焦时会自动放大页面 */
            background: #fff;
        }
        .form-group input:focus, .form-group textarea:focus, .form-group select:focus {
            outline: none;
            border-color: #667eea;
        }
        /* 预览体与评论区已统一进 PlainView 容器视图 itemview（样式自含），
           本文件只保留 items 页列表/表单部分 */
        #messageBox {
            position: fixed;
            top: 10px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 200;
            width: min(720px, 92vw);
        }
        .form-group textarea {
            min-height: 60px;
            resize: vertical;
        }
        .form-hint {
            font-size: 0.75rem;
            color: #a0aec0;
            margin-top: 2px;
        }
        .upload-row {
            display: flex;
            gap: 8px;
            margin-top: 8px;
            align-items: center;
        }
        .upload-row input[type="file"] {
            flex: 1;
            min-width: 0;
            font-size: 0.8rem;
            padding: 6px 8px;
        }
        .upload-row button {
            flex: 0 0 auto;
            padding: 8px 14px;
            font-size: 0.85rem;
        }
        .modal-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }

        /* ---------- 首屏骨架（社区） ----------
           占位卡与真实 .item-card 同尺寸（横向 flex-row，左侧封面 96×96 + 右侧 info
           撑满剩余空间）。跨页 View Transition 淡入期间展示稳定的骨架网格，淡入
           结束后再被真实卡片整页替换（items.js onLoaded 移除骨架节点），避免高度
           突变 + 空白闪烁。全局 prefers-reduced-motion 媒体查询（mobile-shell.css
           :242）已压平所有 animation，shimmer 在该偏好下自动失效，无需重复声明。 */
        @keyframes skShimmer {
            0%   { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
        .item-card.skeleton {
            cursor: default;
            box-shadow: none;
            pointer-events: none;
            /* 关掉 .item-card 自带的 hover/active 视觉反馈，避免骨架看起来可点 */
            transition: none;
        }
        .item-card.skeleton:hover,
        .item-card.skeleton:active {
            transform: none;
            box-shadow: none;
        }
        .item-card.skeleton .sk-cover {
            flex: none;
            width: 96px;
            height: 96px;
            border-radius: 10px;          /* 与真实 .item-cover-wrap 一致 */
            background-color: #edf2f7;
            background-image: linear-gradient(
                90deg,
                #edf2f7 0%,
                #f7fafc 50%,
                #edf2f7 100%
            );
            background-size: 200% 100%;
            animation: skShimmer 1.4s linear infinite;
        }
        .item-card.skeleton .sk-info {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 6px;
            /* 与真实 .item-info 对齐：上下两端对齐，footer 行被推到底 */
            justify-content: space-between;
        }
        .item-card.skeleton .sk-line {
            height: 10px;
            background-color: #edf2f7;
            background-image: linear-gradient(
                90deg,
                #edf2f7 0%,
                #f7fafc 50%,
                #edf2f7 100%
            );
            background-size: 200% 100%;
            animation: skShimmer 1.4s linear infinite;
            border-radius: 4px;
        }
        .item-card.skeleton .sk-line-title { width: 70%; height: 14px; }
        .item-card.skeleton .sk-line-excerpt { width: 95%; }
        .item-card.skeleton .sk-line-excerpt-2 { width: 60%; }
        .item-card.skeleton .sk-info-bottom {
            flex: 1 0 100%;
            display: flex;
            align-items: center;
            gap: 8px;
            padding-top: 10px;
            margin-top: 2px;
            border-top: 1px solid #edf2f7;
        }
        .item-card.skeleton .sk-avatar {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background-color: #edf2f7;
            background-image: linear-gradient(
                90deg,
                #edf2f7 0%,
                #f7fafc 50%,
                #edf2f7 100%
            );
            background-size: 200% 100%;
            animation: skShimmer 1.4s linear infinite;
            flex: none;
        }
        .item-card.skeleton .sk-line-author { width: 60px; }
        .item-card.skeleton .sk-stats {
            margin-left: auto;
            display: flex;
            gap: 12px;
        }
        .item-card.skeleton .sk-stat {
            width: 36px;
            height: 10px;
            border-radius: 4px;
            background-color: #edf2f7;
            background-image: linear-gradient(
                90deg,
                #edf2f7 0%,
                #f7fafc 50%,
                #edf2f7 100%
            );
            background-size: 200% 100%;
            animation: skShimmer 1.4s linear infinite;
        }

        /* ---------- 社区分区查看（plan50）：标题「社区 ▾」下拉 + 分区提示条 ----------
           入口挂在 .msg-header 的 #pageTitle（h1）里；普通用户无三角/无下拉，
           这些节点只由 items.js setupCommunityZone 在 community_zones.length > 1
           时创建。菜单挂在 .msg-header（sticky，本身是 positioned 元素）下，
           绝对定位居中于标题，浮层需高于 .item-card.menu-open 的 z-index 30。 */
        .community-zone-caret {
            display: inline-block;
            margin-left: 4px;
            font-size: 0.78em;
            color: #667eea;
            cursor: pointer;
            padding: 6px 8px;          /* 扩大命中区（▾ 仅 1 字符宽，难点中） */
            -webkit-tap-highlight-color: transparent;
            user-select: none;
            touch-action: manipulation;
        }
        .community-zone-menu {
            position: absolute;
            top: 56px;               /* .msg-header 高度，紧贴顶栏下缘 */
            left: 50%;
            transform: translateX(-50%);
            z-index: 60;
            min-width: 168px;
            background: #fff;
            border: 1px solid var(--border, #e2e8f0);
            border-radius: 10px;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
            padding: 6px;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .community-zone-menu[hidden] { display: none; }
        .community-zone-option {
            border: none;
            background: transparent;
            padding: 10px 12px;
            border-radius: 8px;
            font-size: 0.9rem;
            color: #2d3748;
            text-align: left;
            cursor: pointer;
            min-height: 0;           /* 盖掉 mobile-shell 全局 button 基线 44px */
        }
        .community-zone-option:hover { background: #f0f4ff; }
        .community-zone-option.is-current {
            background: #eef2ff;
            color: #5a67d8;
            font-weight: 600;
        }
