/* DonorCat v1.2 — теги на странице книги и окно «Предложить теги». Светлая тема + body.dark сайта. */
.dct-li .dct-list{font-size:0}
.dct-li .dct-list a{display:inline-block;margin:2px 4px 2px 0;padding:2px 9px;border-radius:12px;background:#f1ecf8;color:#6a4b9a;font-size:13px;text-decoration:none;line-height:20px}
.dct-li .dct-list a:hover{background:#8061ae;color:#fff}
.dark .dct-li .dct-list a{background:#3a3346;color:#cdb9ef}
.dark .dct-li .dct-list a:hover{background:#8061ae;color:#fff}
.dct-li:not(:has(.dct-list)):not(:has(.dct-add:not([hidden]))){display:none}
.dct-add{display:inline-flex;align-items:center;gap:6px;border:1px dashed #b9a5d8;background:transparent;color:#8061ae;border-radius:14px;padding:5px 12px;font:inherit;font-size:13.5px;cursor:pointer;line-height:1.2}
.dct-add:hover{background:#f6f2fc;border-style:solid}
.dark .dct-add{border-color:#6c5a8c;color:#cdb9ef}
.dark .dct-add:hover{background:#3a3346}
.dct-add[hidden]{display:none}

.dct-ov{position:fixed;inset:0;background:rgba(17,17,17,.55);z-index:10000;display:flex;align-items:flex-end;justify-content:center;opacity:0;transition:opacity .18s}
.dct-ov.on{opacity:1}
.dct-sh{background:#fff;color:#333;width:100%;max-height:88vh;max-height:88dvh;border-radius:18px 18px 0 0;display:flex;flex-direction:column;transform:translateY(24px);transition:transform .2s;box-shadow:0 -6px 30px rgba(0,0,0,.18);font-family:'Gotham Pro',Arial,sans-serif;font-size:14px}
.dct-ov.on .dct-sh{transform:none}
@media (min-width:769px){.dct-ov{align-items:center}.dct-sh{width:560px;max-height:80vh;border-radius:16px}}
.dct-grab{width:40px;height:4px;border-radius:2px;background:#ddd;margin:8px auto 0}
@media (min-width:769px){.dct-grab{display:none}}
.dct-hd{padding:12px 18px 10px;border-bottom:1px solid #eee}
.dct-tt{display:flex;align-items:center;justify-content:space-between;gap:10px}
.dct-tt b{font-size:17px;color:#222}
.dct-x{border:0;background:#f3f3f3;width:34px;height:34px;border-radius:50%;font-size:20px;line-height:34px;color:#666;cursor:pointer;flex:none}
.dct-sub{color:#888;font-size:12.5px;margin-top:4px;line-height:1.4}
.dct-sel{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;min-height:32px;align-items:center}
.dct-sel:empty::before{content:'Выберите до 5 тегов';color:#aaa;font-size:13px}
.dct-sel span{display:inline-flex;align-items:center;gap:4px;background:#8061ae;color:#fff;border-radius:15px;padding:5px 6px 5px 11px;font-size:13px}
.dct-sel span i{font-style:normal;width:18px;height:18px;line-height:17px;text-align:center;border-radius:50%;background:rgba(255,255,255,.25);cursor:pointer;font-size:13px}
.dct-q{display:block;width:100%;margin-top:10px;height:40px;border:1px solid #ddd;border-radius:10px;padding:0 12px;font:inherit;font-size:15px;background:#fafafa;color:#333;outline:none;-webkit-appearance:none}
.dct-q:focus{border-color:#8061ae;background:#fff}
.dct-bd{overflow-y:auto;-webkit-overflow-scrolling:touch;padding:6px 18px 14px;flex:1}
.dct-g{margin-top:12px}
.dct-g h4{margin:0 0 7px;font-size:12px;font-weight:normal;color:#999;text-transform:uppercase;letter-spacing:.04em}
.dct-ch{display:flex;flex-wrap:wrap;gap:7px}
.dct-ch button{border:1px solid #e2dbef;background:#fff;color:#4d4d4d;border-radius:16px;padding:7px 12px;font:inherit;font-size:13.5px;cursor:pointer;line-height:1.15;-webkit-tap-highlight-color:transparent}
.dct-ch button:hover{border-color:#8061ae}
.dct-ch button.on{background:#8061ae;border-color:#8061ae;color:#fff}
.dct-ch button em{font-style:normal;color:#aaa;font-size:11.5px;margin-left:4px}
.dct-ch button.on em{color:rgba(255,255,255,.7)}
.dct-ch button:disabled{opacity:.45;cursor:default}
.dct-empty{color:#999;font-size:13px;padding:10px 0}
.dct-ft{padding:12px 18px calc(12px + env(safe-area-inset-bottom));border-top:1px solid #eee;display:flex;align-items:center;gap:12px}
.dct-prog{flex:1;font-size:12.5px;color:#888;line-height:1.35}
.dct-bar{height:5px;background:#eee;border-radius:3px;margin-top:5px;overflow:hidden}
.dct-bar i{display:block;height:100%;background:#8061ae}
.dct-go{border:0;background:#8061ae;color:#fff;border-radius:12px;padding:0 20px;height:44px;font:inherit;font-size:15px;font-weight:bold;cursor:pointer;flex:none}
.dct-go:disabled{background:#cbbfe0;cursor:default}
.dct-ov button.dct-go,.dct-ov button.dct-go:hover,.dct-ov button.dct-go:focus{background:#8061ae!important;color:#fff!important;box-shadow:none}
.dct-ov button.dct-go:disabled{background:#cbbfe0!important}
.dct-msg{padding:28px 8px;text-align:center;color:#4d4d4d;font-size:15px;line-height:1.5}
.dct-msg b{display:block;font-size:18px;color:#222;margin-bottom:6px}
.dct-err{color:#c0392b;font-size:13px;margin-top:8px}
html.dct-lock,html.dct-lock body{overflow:hidden}

.dark .dct-sh{background:#272727;color:#bfbfbf}
.dark .dct-hd,.dark .dct-ft{border-color:#373737}
.dark .dct-tt b,.dark .dct-msg b{color:#e5e5e5}
.dark .dct-x{background:#373737;color:#bfbfbf}
.dark .dct-q{background:#1f1f1f;border-color:#474747;color:#e5e5e5}
.dark .dct-q:focus{background:#171717}
.dark .dct-ch button{background:#2f2f2f;border-color:#474747;color:#d0d0d0}
.dark .dct-ch button.on{background:#8061ae;border-color:#8061ae;color:#fff}
.dark .dct-bar{background:#373737}
.dark .dct-grab{background:#474747}
.dark .dct-msg{color:#bfbfbf}
