/* 收藏沿用全站玻璃变量；正文、表单和焦点在日夜主题中保持清晰。 */
.bm-manage, .bm-more { border: 0; padding: 9px 0; background: transparent; color: var(--blue); font: inherit; font-size: 12px; cursor: pointer; }
.bm-manage { min-height: 44px; white-space: nowrap; }
.bm-home-filter { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 10px; color: var(--muted); font-size: 11px; }
.bm-home-filter select { max-width: 75%; min-height: 40px; padding: 6px 28px 6px 10px; border: 1px solid var(--control-border); border-radius: 10px; background: var(--control-bg); color: var(--text); font: inherit; }
.bm-link { display: flex; align-items: start; justify-content: space-between; gap: 12px; min-width: 0; color: var(--text); text-decoration: none; }
/* 亮边与文字之间留出呼吸距离，圆角和条目间距同步适配玻璃材质。 */
.bm-home-list { display: grid; gap: 6px; padding-block: 6px; }
.bm-compact { padding: 20px 18px; border-top: 1px solid var(--line); border-radius: 14px; gap: 18px; }
.bm-compact .bm-copy { gap: 8px; }
.bm-compact .bm-external { min-width: 22px; text-align: center; }
.bm-copy { display: flex; flex-direction: column; min-width: 0; gap: 6px; }
.bm-copy strong { font-size: 14px; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; }
.bm-meta { color: var(--muted); font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.bm-pin-label { color: var(--blue); margin-right: 8px; }
.bm-note { color: var(--muted); font-size: 12px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.bm-external { flex-shrink: 0; padding-top: 3px; color: var(--blue); font-size: 18px; }
.bm-link:hover strong { color: var(--blue); }
.bm-more { display: block; width: 100%; min-height: 44px; text-align: left; }
.bm-storage-warning { color: var(--muted); font-size: 12px; line-height: 1.7; }
.bm-dialog { position: fixed; width: min(670px, calc(100% - 32px)); max-height: min(84dvh, 820px); margin: auto; padding: 26px; box-sizing: border-box; color: var(--text); border: 1px solid var(--glass-border); border-radius: 25px; background: var(--glass-wash), var(--dialog-bg); box-shadow: var(--dialog-shadow), inset 0 1px 0 var(--inset-highlight); backdrop-filter: blur(26px) saturate(125%) brightness(var(--glass-brightness)); -webkit-backdrop-filter: blur(26px) saturate(125%) brightness(var(--glass-brightness)); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; --muted: var(--glass-muted); }
.bm-dialog::backdrop { background: var(--dialog-backdrop); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.bm-dialog [hidden] { display: none !important; }
.bm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.bm-head h2 { margin: 0; font-size: 23px; font-weight: 650; }
.bm-head p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.bm-close { flex: 0 0 44px; width: 44px; height: 44px; margin: -8px -8px 0 0; padding: 0; border: 0; background: transparent; color: var(--text); font: 28px/1 sans-serif; cursor: pointer; }
.bm-notice { font-size: 12px; line-height: 1.8; color: var(--blue); overflow-wrap: anywhere; }
.bm-notice:not(:has(span:empty)) { margin-bottom: 14px; }
.bm-notice[data-error="true"] { color: #ffc4c4; }
:root[data-theme="light"] .bm-notice[data-error="true"] { color: #a62c46; }
.bm-undo { display: inline-block; padding: 6px 9px; margin-left: 8px; min-height: 40px; color: var(--text); border: 1px solid var(--control-border); border-radius: 9px; background: var(--control-bg); cursor: pointer; }
.bm-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.bm-button { min-height: 42px; padding: 9px 15px; border: 1px solid var(--control-border); border-radius: 11px; background: var(--control-bg); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.bm-primary { color: var(--blue); border-color: var(--line-strong); background: var(--control-active-bg, var(--control-hover)); }
.bm-button:hover, .bm-action:hover, .bm-undo:hover { background: var(--control-hover); border-color: var(--line-strong); }
.bm-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(100px, 150px); gap: 10px; margin-bottom: 10px; }
.bm-tools input, .bm-tools select, .bm-form input:not([type="checkbox"]), .bm-form textarea { width: 100%; box-sizing: border-box; min-height: 44px; padding: 11px 12px; background: var(--input-bg); border: 1px solid var(--control-border); border-radius: 11px; color: var(--text); font: inherit; font-size: 13px; line-height: 1.5; }
.bm-tools input::placeholder, .bm-form input::placeholder, .bm-form textarea::placeholder { color: var(--muted); opacity: .9; }
.bm-item { padding: 19px 0 12px; border-top: 1px solid var(--line); }
.bm-item > .bm-link { padding: 12px; border-radius: 12px; }
.bm-item-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: end; margin-top: 7px; }
.bm-action { min-height: 40px; padding: 7px 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.bm-action[aria-pressed="true"] { color: var(--blue); }
.bm-delete:hover { color: #ffc4c4; }
:root[data-theme="light"] .bm-delete:hover { color: #a62c46; }
.bm-empty { padding: 18px 0; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.bm-form h3 { font-size: 16px; margin: 5px 0 18px; }
.bm-form > label { display: flex; flex-direction: column; gap: 8px; margin-bottom: 17px; color: var(--muted); font-size: 12px; }
.bm-form textarea { resize: vertical; max-height: 220px; }
.bm-form > .bm-checkbox { flex-direction: row; align-items: center; gap: 9px; min-height: 34px; cursor: pointer; }
.bm-checkbox input { width: 17px; height: 17px; accent-color: var(--blue); }
.bm-form-actions { display: flex; gap: 10px; padding-top: 2px; }
.bm-dialog :focus-visible, .bm-home-filter select:focus-visible, .bm-link:focus-visible, .bm-more:focus-visible, .bm-manage:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.bm-dialog select option, .bm-home-filter select option { background: var(--glass-fallback); color: var(--text); }
@media (max-width: 620px) {
  /* 窄屏保留足够的左右留白，同时让标题与箭头有各自空间。 */
  .bm-compact { padding: 18px 14px; gap: 12px; }
  .bm-dialog { width: calc(100% - 24px); max-height: 88dvh; padding: 21px 17px; border-radius: 21px; }
  .bm-head h2 { font-size: 21px; }
  .bm-tools { grid-template-columns: 1fr; }
  /* 手机上输入使用 16px，避免 iOS 聚焦表单时强制放大页面。 */
  .bm-tools input, .bm-tools select, .bm-form input:not([type="checkbox"]), .bm-form textarea { font-size: 16px; }
  .bm-item-actions { justify-content: start; }
  .bm-button, .bm-action { min-height: 44px; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bm-dialog { background: var(--glass-fallback); }
}
@media (prefers-reduced-transparency: reduce) {
  .bm-dialog { background: var(--glass-fallback); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .bm-dialog::backdrop { background: rgba(4, 10, 22, .5); backdrop-filter: none; }
}
