/* 卡片收藏（2026-10-31）：首页最上方“我的收藏”、卡片标题旁书签、整理清单、独立页面“收藏本页”。深色由 theme.js 统一换色。 */
.aloha-brand-actions #header-bookmarks{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;height:42px;min-width:42px;padding:0 12px 0 10px;border:1px solid rgba(223,235,248,.48);border-radius:999px;background:rgba(255,255,255,.08);color:#edf3fa;font:inherit;font-size:13px;font-weight:600;letter-spacing:.04em;white-space:nowrap;cursor:pointer;box-sizing:border-box}
.aloha-brand-actions #header-bookmarks:hover{background:rgba(255,255,255,.17)}
.aloha-brand-actions #header-bookmarks:focus-visible{outline:2px solid #fff;outline-offset:3px}
.aloha-brand-actions #header-bookmarks svg{flex:none;pointer-events:none}
@media(max-width:640px){.aloha-brand-actions #header-bookmarks{width:40px;height:40px;min-width:0;padding:0}.aloha-brand-actions #header-bookmarks .bm-label{display:none}.aloha-brand-actions #header-bookmarks svg{width:18px;height:18px}}
@media(max-width:420px){.aloha-brand.site-search-header .aloha-brand-actions #header-bookmarks{width:36px;height:38px}}

.bm-star{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;margin:0 0 0 6px;padding:0;border:0;border-radius:8px;background:transparent;color:#a3abb4;vertical-align:middle;cursor:pointer;flex:none;font:inherit;line-height:1}
.bm-star svg{width:16px;height:16px;pointer-events:none}
.bm-star:hover{color:#2b5483;background:rgba(43,84,131,.08)}
.bm-star:focus-visible{outline:2px solid #2b5483;outline-offset:1px}
.bm-star[aria-pressed=true]{color:#2b5483}
.bm-star[aria-pressed=true] svg,.bm-page-star[aria-pressed=true] svg{fill:currentColor}

.bm-page-tools{display:inline-flex;align-items:center;gap:8px;margin-left:14px;vertical-align:middle}
.bm-page-tools button{display:inline-flex;align-items:center;gap:5px;min-height:32px;padding:0 12px;border:1px solid #ddd7c9;border-radius:999px;background:#fffdf8;color:#2b5483;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.bm-page-tools button:hover{border-color:#2b5483}
.bm-page-tools svg{width:14px;height:14px}

.bm-dialog{width:min(560px,calc(100vw - 32px));max-height:min(80vh,720px);padding:0;border:1px solid #e9e4d8;border-radius:16px;background:#fffdf8;color:#0e1a28;box-shadow:0 24px 60px -24px rgba(14,26,40,.45)}
.bm-dialog::backdrop{background:rgba(14,26,40,.38)}
.bm-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px 10px;border-bottom:1px solid #ddd7c9}
.bm-head h2{margin:0;font-size:21px;font-weight:700}
.bm-close{border:0;background:none;color:#5f6975;font:inherit;font-size:13px;cursor:pointer;padding:6px 4px}
.bm-close:hover{color:#2b5483}
.bm-body{padding:6px 20px 4px;overflow:auto;max-height:calc(min(80vh,720px) - 140px)}
.bm-count,.bm-note{margin:10px 0;font-size:12px;color:#5f6975;text-wrap:pretty}
.bm-note{padding:10px 20px 16px;margin:0;border-top:1px solid #ddd7c9}
.bm-empty{margin:14px 0;font-size:14px;color:#5f6975}
.bm-body .btn{margin:0 0 14px}
.bm-group h3{margin:14px 0 4px;font-size:12px;font-weight:600;color:#5f6975}
.bm-list{list-style:none;margin:0;padding:0}
.bm-row{display:flex;align-items:center;gap:10px;border-top:1px solid #ddd7c9}
.bm-row:first-child{border-top:0}
.bm-go{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:10px 0;border:0;background:none;text-align:left;font:inherit;color:#0e1a28;cursor:pointer}
.bm-go:hover .bm-title{color:#2b5483;text-decoration:underline;text-underline-offset:3px}
.bm-title{font-size:15px;font-weight:600;overflow-wrap:anywhere}
.bm-where{font-size:12px;color:#5f6975}
.bm-remove{flex:none;border:0;background:none;color:#5f6975;font:inherit;font-size:13px;cursor:pointer;padding:6px 2px}
.bm-remove:hover{color:#2b5483}

.bm-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:60;max-width:calc(100vw - 32px);padding:10px 16px;border-radius:999px;background:#11263a;color:#fff;font-size:13px;box-shadow:0 10px 24px -12px rgba(14,26,40,.6)}
.bm-toast[hidden],.bm-note[hidden]{display:none}
@media print{.bm-star,.bm-page-tools,#header-bookmarks,.bm-toast{display:none!important}}

/* 首页最上方“我的收藏” */
.home-bookmarks .hb-head{display:flex;align-items:baseline;gap:10px}
.home-bookmarks .hb-head h2{margin:0}
.hb-count{font-size:13px;color:#5f6975}
.hb-manage,.hb-more{border:0;background:none;padding:4px 2px;font:inherit;font-size:13px;color:#2b5483;cursor:pointer}
.hb-manage{margin-left:auto}
.hb-manage:hover,.hb-more:hover{text-decoration:underline;text-underline-offset:3px}
.hb-grid{list-style:none;margin:14px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}
.hb-grid li{margin:0;padding:0;min-width:0}
.home-bookmarks .hb-tile{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:6px;width:100%;height:100%;min-height:68px;margin:0;padding:12px 14px;border:1px solid #e9e4d8;border-radius:10px;background:transparent;box-shadow:none;text-align:left;font:inherit;color:#0e1a28;cursor:pointer;transition:border-color .15s,background-color .15s}
.home-bookmarks .hb-tile:hover{border-color:#2b5483;background:rgba(43,84,131,.04)}
.home-bookmarks .hb-tile:focus-visible{outline:2px solid #2b5483;outline-offset:2px}
.hb-t{font-size:15px;font-weight:600;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.hb-w{font-size:12px;color:#5f6975;line-height:1.3}
.hb-more{margin-top:10px}
@media(max-width:640px){.hb-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.home-bookmarks .hb-tile{min-height:60px;padding:10px 12px}.hb-t{font-size:14px}}
@media print{.home-bookmarks{display:none!important}}
