.bookmark-more { position: absolute; z-index: 4; right: 4px; bottom: 3px; display: grid; place-items: center; width: 26px; height: 24px; padding: 0; border: 0; border-radius: 7px; background: var(--bg); color: var(--muted); opacity: 0; cursor: pointer; }
.bookmark-more svg { width: 17px; height: 17px; fill: currentColor; }
.bookmark-item:hover .bookmark-more, .bookmark-item:focus-within .bookmark-more, .bookmark-more[aria-expanded="true"] { opacity: 1; }
.bookmark-more:hover { color: var(--text); }
.bookmark-more:focus-visible, .bookmark-context-menu button:focus-visible, .bookmark-details-dialog button:focus-visible, .bookmark-details-dialog textarea:focus-visible { outline: 2px solid var(--skin-accent, #7dd3fc); outline-offset: 2px; }
/* Single-line views reserve space for both controls instead of covering their titles. */
html:is([data-layout="index"], [data-layout="text"], [data-layout="table"]) #main .card { padding-right: 60px; }
html:is([data-layout="index"], [data-layout="text"], [data-layout="table"]) #main .bookmark-more { top: 50%; right: 32px; bottom: auto; transform: translateY(-50%); }
html:is([data-layout="icons"], [data-layout="start"], [data-layout="tiles"]) .bookmark-more { top: 1px; left: 1px; right: auto; bottom: auto; width: 20px; height: 20px; }
html:is([data-layout="icons"], [data-layout="start"], [data-layout="tiles"]) .bookmark-more svg { width: 14px; height: 14px; }
.bookmark-context-menu { position: fixed; z-index: 100; width: 204px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow-y: auto; padding: 6px; border: 1px solid var(--stroke); border-radius: 12px; color: var(--text); background: var(--bg); box-shadow: 0 12px 36px #0003; }
.bookmark-context-menu[hidden] { display: none; }
.bookmark-context-menu button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 7px; text-align: left; color: inherit; background: none; font: inherit; font-size: 13px; cursor: pointer; }
.bookmark-context-menu button:hover, .bookmark-context-menu button:focus { background: var(--glass); }
.bookmark-context-menu button:disabled { opacity: .45; cursor: default; }
.bookmark-menu-status { margin: 8px 10px 4px; color: var(--muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.bookmark-menu-status:empty { display: none; }
.bookmark-details-dialog { width: min(500px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 22px; border: 1px solid var(--stroke); border-radius: 16px; background: var(--bg); color: var(--text); }
.bookmark-details-dialog::backdrop { background: #0006; backdrop-filter: blur(4px); }
.bookmark-details-heading { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.bookmark-details-heading h2 { margin: 0; font-size: 17px; }
.bookmark-details-dialog button { border: 1px solid var(--stroke); border-radius: 8px; background: var(--glass); color: var(--text); padding: 8px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.bookmark-details-heading button { width: 32px; height: 32px; padding: 0; font-size: 21px; }
.bookmark-details-dialog dl { margin: 20px 0 16px; }
.bookmark-details-dialog dt, .bookmark-details-dialog label { display: block; color: var(--muted); font-size: 12px; }
.bookmark-details-dialog dd { margin: 5px 0 16px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bookmark-details-dialog textarea { display: block; width: 100%; margin-top: 6px; padding: 10px; resize: vertical; min-height: 80px; max-height: 35vh; border: 1px solid var(--stroke); border-radius: 8px; color: var(--text); background: var(--glass); font: 13px/1.6 ui-monospace, monospace; overflow-wrap: anywhere; }
.bookmark-details-dialog .bookmark-menu-status { margin-inline: 0; }
.bookmark-details-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
@media (hover: none), (pointer: coarse) { .bookmark-more { opacity: 1; } }
@media (max-width: 600px) { #pinnedGrid .bookmark-more { top: 1px; left: 1px; right: auto; bottom: auto; width: 20px; height: 20px; } #pinnedGrid .bookmark-more svg { width: 14px; height: 14px; } }
