.mre-shelf-entry,.mre-shelf-save,.mre-shelf-dialog button{font:inherit;cursor:pointer;line-height:1.4;touch-action:manipulation}
.mre-shelf-entry{display:inline-flex;align-items:center;gap:7px;margin-left:auto;padding:7px 11px;border:1px solid #e0bda1;border-radius:8px;background:#fff5e9;color:#6b3c22;font-size:13px;font-weight:700;white-space:nowrap}
.mre-shelf-count{min-width:1.7em;padding:1px 5px;border-radius:10px;background:#805038;color:white;text-align:center;font-size:12px}
.mre-theme-nav>.mre-shelf-entry{margin:7px 0 0}
#mp-ol-catalog .mre-shelf-save,#mp-ranking-catalog .mre-shelf-save{display:inline-flex;justify-content:center;align-items:center;width:auto;margin:7px 0 0;padding:5px 9px;border:1px solid #dccdbd;border-radius:6px;background:#fff9f1;color:#704727;font-size:12px;font-weight:700;box-shadow:none}
#mp-ol-catalog .mre-shelf-save[aria-pressed=true],#mp-ranking-catalog .mre-shelf-save[aria-pressed=true]{background:#fae3bf;border-color:#bd8850;color:#583415}
.mre-shelf-entry:hover,#mp-ol-catalog .mre-shelf-save:hover,#mp-ranking-catalog .mre-shelf-save:hover{background:#f9e6cf}
.mre-shelf-dialog{position:fixed;inset:0;width:min(1120px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 40px);margin:auto;padding:18px 20px;border:1px solid #d8bfa6;border-radius:15px;background:#fffcf8;color:#332c27;box-shadow:0 16px 70px #30201242;font:14px/1.65 system-ui,-apple-system,"Segoe UI","Noto Sans JP",sans-serif;overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box}
.mre-shelf-dialog:not([open]){display:none}
.mre-shelf-dialog::backdrop{background:#221a145f}
.mre-shelf-dialog *{box-sizing:border-box}
.mre-shelf-dialog .mre-shelf-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 6px;padding:3px 0 8px;background:#fffcf8}
.mre-shelf-dialog h2{margin:0;padding:0;border:0;background:none;font-size:21px;font-weight:750;color:#4b3424;line-height:1.4}
.mre-shelf-dialog h2:before,.mre-shelf-dialog h2:after,.mre-shelf-dialog h3:before,.mre-shelf-dialog h3:after{content:none}
.mre-shelf-dialog button{padding:6px 10px;border:1px solid #d8c4af;border-radius:6px;background:#fff;color:#63462d;font-size:13px;font-weight:600}
.mre-shelf-dialog button:hover{background:#faecd9}
.mre-shelf-dialog button:disabled{cursor:default;opacity:.5}
.mre-shelf-dialog p{margin:0}
.mre-shelf-dialog .mre-shelf-note{font-size:12px;color:#716457;margin-bottom:12px}
.mre-shelf-dialog .mre-shelf-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 0;border-top:1px solid #ece1d7;border-bottom:1px solid #ece1d7}
.mre-shelf-dialog .mre-shelf-search{flex:1;min-width:200px}
.mre-shelf-dialog .mre-shelf-search input{width:100%;margin:0;padding:8px 10px;border:1px solid #cdbdae;border-radius:6px;background:white;color:#332c27;font:inherit;line-height:1.3}
.mre-shelf-dialog .mre-shelf-selection{font-size:12px;color:#756455;white-space:nowrap}
.mre-shelf-dialog .mre-shelf-compare[aria-pressed=true]{background:#f5dec1;border-color:#ba8657}
.mre-shelf-dialog .mre-shelf-status{min-height:1.7em;margin:6px 0;font-size:12px;color:#5d6d45}
.mre-shelf-dialog .mre-shelf-status.is-error{color:#a12d20}
.mre-shelf-dialog .mre-shelf-result{font-size:12px;color:#766454;margin-bottom:7px}
.mre-shelf-dialog .mre-shelf-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.mre-shelf-dialog .mre-shelf-item{display:grid;grid-template-columns:72px minmax(0,1fr);grid-template-rows:auto 1fr;align-content:start;gap:7px 10px;border:1px solid #e1d2c3;border-radius:8px;background:#fff;padding:10px;min-width:0}
.mre-shelf-dialog .mre-shelf-item-top{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;min-height:26px}
.mre-shelf-dialog .mre-shelf-pick{display:inline-flex;align-items:center;gap:5px;font-size:12px;cursor:pointer}
.mre-shelf-dialog .mre-shelf-pick input{width:16px;height:16px;margin:0;accent-color:#986634}
.mre-shelf-dialog .mre-shelf-remove{padding:2px 7px;font-size:11px;font-weight:400;background:#faf7f4}
.mre-shelf-dialog .mre-shelf-art{display:flex;align-items:center;justify-content:center;width:72px;height:99px;border-radius:4px;overflow:hidden;background:#f3ede6;color:#8b7b6b;font-size:11px;text-decoration:none}
.mre-shelf-dialog .mre-shelf-art img{display:block;width:100%;height:100%;object-fit:contain;margin:0}
.mre-shelf-dialog .mre-shelf-item-content{min-width:0}
.mre-shelf-dialog h3{margin:0 0 5px;padding:0;border:0;background:none;font-size:13px;font-weight:700;line-height:1.55;overflow-wrap:anywhere}
.mre-shelf-dialog a{color:#75502e;text-decoration:none;box-shadow:none}
.mre-shelf-dialog a:hover{text-decoration:underline;color:#a45526}
.mre-shelf-dialog .mre-shelf-author{font-size:11px;color:#63584d;overflow-wrap:anywhere;margin-bottom:4px}
.mre-shelf-dialog .mre-shelf-source{display:block;font-size:10px;line-height:1.5;color:#7c6c5a;overflow-wrap:anywhere}
.mre-shelf-dialog .mre-shelf-actions{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
.mre-shelf-dialog .mre-shelf-actions a{border:1px solid #e0cbb5;border-radius:4px;padding:3px 5px;font-size:11px;background:#fff9f0;white-space:nowrap}
.mre-shelf-dialog .mre-shelf-empty{padding:25px 12px;text-align:center;background:#fff;border:1px dashed #decbb5;border-radius:8px;color:#72634f}
.mre-shelf-dialog .mre-shelf-empty strong{display:block;font-size:16px;color:#624b35}
.mre-shelf-dialog .mre-shelf-empty p{margin:7px 0;font-size:13px}
.mre-shelf-dialog .mre-shelf-footnote{padding-top:12px;font-size:11px;color:#827465}
.mre-shelf-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.mre-shelf-toast{position:fixed;bottom:18px;left:50%;transform:translate(-50%,10px);max-width:min(560px,calc(100vw - 32px));padding:10px 16px;border-radius:9px;background:#59422e;color:#fff;font:13px/1.6 system-ui,-apple-system,"Noto Sans JP",sans-serif;z-index:999999;opacity:0;visibility:hidden;pointer-events:none;box-shadow:0 4px 20px #0003;transition:opacity .16s,transform .16s;overflow-wrap:anywhere}
.mre-shelf-toast.is-visible{opacity:1;visibility:visible;transform:translate(-50%,0)}
.mre-shelf-toast.is-error{background:#973c30}
.mre-shelf-entry:focus-visible,.mre-shelf-save:focus-visible,.mre-shelf-dialog :focus-visible{outline:3px solid #427aac;outline-offset:3px}
@media(max-width:850px){.mre-shelf-dialog .mre-shelf-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mre-theme-nav__heading .mre-shelf-entry{margin-left:0}}
@media(max-width:560px){.mre-shelf-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:13px 12px;border-radius:11px}.mre-shelf-dialog h2{font-size:19px}.mre-shelf-dialog .mre-shelf-grid{grid-template-columns:1fr;gap:8px}.mre-shelf-dialog .mre-shelf-item{grid-template-columns:66px minmax(0,1fr);gap:5px 9px;padding:9px}.mre-shelf-dialog .mre-shelf-art{width:66px;height:91px}.mre-shelf-dialog .mre-shelf-search{flex-basis:100%}.mre-shelf-dialog .mre-shelf-search input{font-size:16px}.mre-shelf-dialog .mre-shelf-note{font-size:11px}.mre-shelf-entry{padding:5px 8px;font-size:12px}.mre-shelf-dialog .mre-shelf-status{margin:4px 0}}
@media(prefers-reduced-motion:reduce){.mre-shelf-toast{transition:none}}
