:root{
  color-scheme:light;
  --bg:#f5f6f8;--surface:#fff;--text:#202631;--muted:#626b79;
  --line:#e1e5eb;--primary:#2456b8;--primary-soft:#eef3fd;
  --warning:#885000;--warning-soft:#fff7e9;
  --danger:#b42328;--danger-soft:#fff0f0;
  --radius:12px;
}
*{box-sizing:border-box}
body{margin:0;min-width:1280px;background:var(--bg);color:var(--text);font-family:Manrope,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;font-size:14px;line-height:1.5}
button,input,select{font:inherit}
button,a,input,select{-webkit-tap-highlight-color:transparent}
button{cursor:pointer;color:inherit}
a{color:inherit;text-decoration:none}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,.post:focus-visible{outline:3px solid var(--primary);outline-offset:3px}
button:disabled{cursor:wait;opacity:.55}
[hidden]{display:none!important}
svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.num,time,.price{font-variant-numeric:tabular-nums lining-nums}
.sprite{position:absolute;width:0;height:0;overflow:hidden}

/* ---- 顶栏 ---- */
.topbar{height:72px;background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 32px}
.brand{display:flex;align-items:center;gap:11px;font-size:22px;font-weight:750;letter-spacing:-.6px}
.brand-icon{display:grid;place-items:center;width:34px;height:34px;background:var(--primary);color:white;border-radius:9px}
.brand-icon svg{width:21px;height:21px}
.top-actions{display:flex;align-items:center;gap:25px}
.fetch-status{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px}
.status-dot{height:6px;width:6px;background:var(--primary);border-radius:50%}
.settings-button{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 10px;background:none;border:0;border-radius:7px}
.settings-button:hover{background:var(--bg)}
.alert{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:54px;padding:10px 32px;background:var(--danger-soft);border-bottom:1px solid #e5b9bc;color:var(--danger);font-weight:650}
.alert-message{display:flex;align-items:center;gap:10px;overflow-wrap:anywhere}
.alert-time{font-size:13px;font-weight:550;white-space:nowrap}

/* ---- 布局 + 左栏 ---- */
.layout{display:grid;grid-template-columns:312px minmax(0,1fr);gap:28px;max-width:1600px;margin:auto;padding:26px 32px 40px;align-items:start}
.sidebar{position:sticky;top:22px}
.side-title{display:flex;align-items:center;gap:9px;margin:3px 0 18px;font-size:16px;font-weight:700}
.side-title svg{width:19px;height:19px;color:var(--muted)}
.schedule{border:1px solid var(--line);background:var(--surface);border-radius:var(--radius);overflow:hidden auto;max-height:calc(100vh - 130px)}
.schedule-item{display:block;padding:18px 19px;border-bottom:1px solid var(--line);position:relative;transition:background .14s ease}
.schedule-item:last-child{border-bottom:0}
.schedule-item:hover{background:#f8f9fc}
.schedule-item.urgent{background:var(--warning-soft);box-shadow:inset 3px 0 var(--warning)}
.schedule-item.urgent:hover{background:#fff0d6}
.schedule-meta{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--muted);gap:8px;margin-bottom:8px}
.kind{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:650;white-space:nowrap}
.kind svg{width:14px;height:14px}
.kind.auction{color:var(--text)}
.kind.buy_now,.kind.preview{color:var(--primary)}
.kind.other,.kind.pending{color:var(--muted)}
.schedule-name{font-size:14px;font-weight:650;line-height:1.6;margin:0 0 9px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.schedule-bottom{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.schedule-count{font-size:17px;font-weight:750;letter-spacing:-.3px;white-space:nowrap}
.urgent .schedule-count{color:var(--warning)}
.schedule-bids{font-size:12px;color:var(--muted);text-align:right}
.schedule-bids strong{color:var(--text);font-size:14px;font-weight:700}
.schedule-item.finished{background:#fafbfc}
.finished .schedule-count{font-size:14px;font-weight:600;color:var(--muted)}
.schedule-empty{padding:28px 19px;color:var(--muted);font-size:13px;text-align:center}
.side-foot{margin:16px 0 0;display:flex;justify-content:space-between;font-size:12px;color:var(--muted)}
.side-foot span:first-child{display:flex;align-items:center;gap:5px}
.side-foot svg{width:14px;height:14px}

/* ---- 主区 ---- */
main{min-width:0}
.page-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 15px;min-height:33px}
h1{font-size:24px;line-height:1.3;letter-spacing:-.7px;margin:0;font-weight:750}
.heading-info{font-size:13px;color:var(--muted)}
.filters{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);margin-bottom:14px}
.tabs{display:flex;align-items:stretch;gap:20px}
.tab{position:relative;background:none;border:0;min-height:49px;padding:0 1px;font-size:14px;color:var(--muted);font-weight:550;white-space:nowrap}
.tab:hover{color:var(--primary)}
.tab[aria-pressed="true"]{color:var(--primary);font-weight:750}
.tab[aria-pressed="true"]::after{content:"";position:absolute;bottom:-1px;left:0;right:0;height:3px;background:var(--primary);border-radius:2px 2px 0 0}
.filter-tools{display:flex;align-items:center;gap:15px}
.group-filter{display:flex;align-items:center;gap:7px}
.group-filter label{font-size:12px;color:var(--muted)}
.group-filter select{max-width:177px;height:36px;padding:0 26px 0 9px;border:1px solid var(--line);border-radius:6px;background:var(--surface);font-size:12px;color:var(--text)}
.switch-label{display:flex;align-items:center;gap:8px;min-height:44px;cursor:pointer;white-space:nowrap;font-size:12px;color:var(--muted)}
.switch-input{position:absolute;opacity:0;width:1px;height:1px}
.switch{width:30px;height:18px;border-radius:12px;background:#929ba8;position:relative;flex:none;transition:background .15s ease}
.switch::after{content:"";position:absolute;left:3px;top:3px;width:12px;height:12px;background:white;border-radius:50%;transition:transform .15s ease}
.switch-input:checked+.switch{background:var(--primary)}
.switch-input:checked+.switch::after{transform:translateX(12px)}
.switch-input:focus-visible+.switch{outline:3px solid var(--primary);outline-offset:4px}
.new-posts{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:41px;padding:8px 14px;border:1px solid #cfdcf5;background:var(--primary-soft);color:var(--primary);border-radius:8px;margin-bottom:14px;text-align:left;font-size:13px;font-weight:650;transition:background .14s ease}
.new-posts:hover{background:#e2ebfc}
.new-posts .new-left{display:flex;align-items:center;gap:9px}
.new-posts svg{width:16px;height:16px}
.new-posts .new-action{font-size:12px;display:flex;align-items:center;gap:7px}

/* ---- 帖子卡片 ---- */
.feed{display:grid;gap:12px}
.post{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px 17px 14px 20px;min-width:0;cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease}
.post:hover{border-color:#aabbd9;box-shadow:0 3px 10px #253a6010}
.post-layout{display:grid;grid-template-columns:minmax(0,1fr) 214px;gap:20px;align-items:center}
.post-layout.no-media{grid-template-columns:minmax(0,1fr)}
.post-main{min-width:0}
.post-meta{display:flex;align-items:center;gap:7px;padding-right:34px;color:var(--muted);font-size:12px;line-height:19px;margin-bottom:7px;min-width:0;flex-wrap:wrap}
.post-group{font-weight:550;max-width:100%;overflow-wrap:anywhere}
.meta-divider{color:#a4aab4}
.badge{display:inline-flex;align-items:center;gap:4px;padding:0 7px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--muted);font-size:11px;line-height:17px;white-space:nowrap}
.badge svg{width:11px;height:11px}
.post-title{font-size:17px;line-height:1.5;font-weight:750;letter-spacing:-.25px;margin:0 0 7px;overflow-wrap:anywhere}
.post:hover .post-title{color:var(--primary)}
.post-body{font-size:12px;line-height:1.55;color:var(--muted);margin:0;white-space:pre-line;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.post-body.expanded{display:block;overflow:visible}
.expand-button{position:relative;z-index:2;min-height:28px;padding:3px 6px;margin:1px 0 0 -6px;background:none;border:0;border-radius:4px;color:var(--primary);font-size:12px}
.expand-button:hover{background:var(--primary-soft)}
.post-status{display:flex;align-items:center;gap:8px;margin-top:9px;flex-wrap:wrap;min-height:23px;font-size:12px;color:var(--muted)}
.post-status strong{font-size:15px;color:var(--text);font-weight:750}
.post-status .urgent-text{color:var(--warning);font-weight:700}
.post-status .status-separator{color:#a8aeb8}
.post-status .opened{display:inline-flex;align-items:center;gap:5px;color:var(--primary);font-weight:650}
.status-icon{width:15px;height:15px}
.removed{color:var(--muted);font-size:12px;display:inline-flex;align-items:center;gap:5px}
.post.is-deleted .post-title{color:var(--muted)}
.media-area{display:flex;align-items:center;justify-content:center;min-width:0;min-height:115px;padding-right:23px}
.media{display:flex;align-items:center;justify-content:center;gap:8px;width:100%}
.thumb{display:grid;place-items:center;flex:none;border:1px solid #e4e6e9;border-radius:5px;overflow:hidden;background:var(--surface)}
.thumb img{display:block;width:100%;height:100%;object-fit:contain}
.thumb.card{width:53px;aspect-ratio:63/88}
.thumb.card.single{width:76px}
.thumb.car{width:82px;aspect-ratio:4/3}
.media.four{display:grid;grid-template-columns:74px 74px;gap:6px;justify-content:center}
.media.four .thumb{width:74px;aspect-ratio:4/3}
.save-button{position:absolute;right:7px;top:7px;z-index:3;width:40px;height:40px;border:0;border-radius:7px;display:grid;place-items:center;background:transparent;color:#7d8794;transition:background .14s ease,color .14s ease}
.save-button svg{width:19px;height:19px}
.save-button:hover{background:var(--primary-soft);color:var(--primary)}
.save-button[aria-pressed="true"]{color:var(--primary)}
.save-button[aria-pressed="true"] svg{fill:var(--primary)}
.external-indicator{position:absolute;right:17px;bottom:15px;color:#7d8794;width:14px;height:14px;opacity:0;transition:opacity .14s ease}
.post:hover .external-indicator,.post:focus-visible .external-indicator{opacity:1}
.inventory-button{position:relative;z-index:2;display:inline-flex;align-items:center;gap:5px;background:none;border:0;border-radius:4px;padding:4px 6px;color:var(--primary);font-size:12px;min-height:32px}
.inventory-button:hover{background:var(--primary-soft)}
.inventory-button svg{width:14px;height:14px;transition:transform .15s ease}
.inventory-button[aria-expanded="true"] svg{transform:rotate(180deg)}
.inventory{margin-top:12px;border-top:1px solid var(--line);padding-top:12px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.inventory-item{display:flex;align-items:center;gap:8px;min-width:0;font-size:12px}
.inventory-item .thumb.card{width:30px}
.inventory-item span{overflow-wrap:anywhere;white-space:pre-line}
.inventory-note{grid-column:1/-1;color:var(--muted);font-size:12px}
.empty{padding:64px 24px;text-align:center;background:white;border:1px solid var(--line);border-radius:var(--radius)}
.empty h2{font-size:17px;margin:0 0 15px}
.empty button,.btn-primary{background:var(--primary);color:white;border:0;border-radius:6px;min-height:40px;padding:0 18px;font-weight:650}
.feed-foot{padding:18px 0 0;text-align:center;color:var(--muted);font-size:12px;min-height:40px}
.fresh{animation:fresh 1.8s ease-out}
@keyframes fresh{from{border-color:var(--primary);background:#f1f5ff}to{border-color:var(--line);background:var(--surface)}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---- 登录页 ---- */
.login-body{min-width:0;min-height:100vh;display:grid;place-items:center}
.login-card{width:360px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:30px 28px 28px}
.login-card .brand{margin-bottom:24px}
.field{display:grid;gap:6px;font-size:12px;color:var(--muted)}
.field input{height:40px;padding:0 11px;border:1px solid var(--line);border-radius:6px;background:var(--surface);font-size:14px;color:var(--text);width:100%}
.login-card .btn-primary{width:100%;margin-top:16px}
.form-error{margin:12px 0 0;min-height:20px;color:var(--danger);font-size:13px;font-weight:650}

/* ---- 设置页 ---- */
.settings-layout{max-width:1040px;margin:auto;padding:26px 32px 48px;display:grid;gap:22px}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:20px 22px 22px}
.panel h2{font-size:16px;font-weight:700;margin:0 0 14px}
.group-table{width:100%;border-collapse:collapse;font-size:13px}
.group-table th{text-align:left;font-size:12px;font-weight:550;color:var(--muted);padding:0 10px 9px 0;border-bottom:1px solid var(--line)}
.group-table td{padding:8px 10px 8px 0;border-bottom:1px solid var(--line);vertical-align:middle;overflow-wrap:anywhere}
.group-table td.url{color:var(--muted);font-size:12px}
.group-table td.url a:hover{color:var(--primary)}
.group-table .col-switch{width:70px}
.group-table .col-del{width:70px;text-align:right;padding-right:0}
.group-table tr.off td.name,.group-table tr.off td.url{color:#9aa1ac}
.table-empty{color:var(--muted);text-align:center;padding:22px 0!important}
.btn-ghost{background:none;border:1px solid var(--line);border-radius:6px;min-height:32px;padding:0 12px;font-size:12px;color:var(--muted)}
.btn-ghost:hover{border-color:#d39195;color:var(--danger);background:var(--danger-soft)}
.add-form{display:grid;grid-template-columns:240px minmax(0,1fr) auto;gap:12px;align-items:end;margin-top:16px}
.settings-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 18px}
.form-actions{display:flex;align-items:center;gap:14px;margin-top:18px}
.form-actions .form-error,.add-row .form-error{margin:0}
.form-ok{color:var(--primary);font-size:13px;font-weight:650}
.add-row{margin-top:10px;min-height:20px}

@media(min-width:1500px){.post-layout{grid-template-columns:minmax(0,1fr) 246px}.thumb.card{width:59px}.tabs{gap:25px}}
@media(max-width:1320px){.layout{padding-left:24px;padding-right:24px;gap:22px;grid-template-columns:300px minmax(0,1fr)}.topbar{padding:0 24px}.alert{padding-left:24px;padding-right:24px}.tabs{gap:15px}.filter-tools{gap:10px}.group-filter select{max-width:147px}.post-layout{grid-template-columns:minmax(0,1fr) 184px;gap:13px}.thumb.card{width:45px}.media{gap:6px}.media-area{padding-right:17px}.thumb.car{width:74px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
