.tfmb-wrap{display:grid;grid-template-columns:320px 1fr;gap:18px;align-items:start}
@media(max-width:900px){.tfmb-wrap{grid-template-columns:1fr}.tfmb-sidebar{position:relative}}
.tfmb-panel{border:1px solid rgba(0,0,0,.08);border-radius:14px;padding:14px;background:#fff;box-shadow:0 10px 30px rgba(0,0,0,.05)}
.tfmb-title{font-size:18px;font-weight:700;margin-bottom:10px}
.tfmb-filters input[type="text"],.tfmb-filters select{width:100%;padding:10px 12px;border-radius:10px;border:1px solid rgba(0,0,0,.12);margin:0 0 8px 0}
.tfmb-filters button{width:100%;padding:10px 12px;border-radius:10px;border:0;background:#111;color:#fff;font-weight:600;cursor:pointer}
.tfmb-cat-title{margin-top:14px;font-weight:700}
.tfmb-cats{list-style:none;margin:8px 0 0 0;padding:0}
.tfmb-cats li{margin:6px 0}
.tfmb-cats a{display:block;text-decoration:none;padding:8px 10px;border-radius:10px;color:#111}
.tfmb-cats a:hover{background:rgba(0,0,0,.04)}
.tfmb-cats a.is-active{background:rgba(0,0,0,.07);font-weight:700}
.tfmb-subcats{list-style:none;margin:6px 0 0 10px;padding:0;border-left:2px solid rgba(0,0,0,.06)}
.tfmb-subcats li{margin:4px 0}
.tfmb-help{margin-top:14px;color:#555;font-size:13px;line-height:1.4}
.tfmb-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
@media(max-width:1100px){.tfmb-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.tfmb-grid{grid-template-columns:1fr}}
.tfmb-card{border:1px solid rgba(0,0,0,.08);border-radius:16px;overflow:hidden;background:#fff;box-shadow:0 10px 24px rgba(0,0,0,.04)}
.tfmb-thumb{width:100%;aspect-ratio:4/3;background-size:cover;background-position:center}
.tfmb-noimg{height:100%;display:flex;align-items:center;justify-content:center;color:#666;font-size:13px}
.tfmb-card-body{padding:12px}
.tfmb-name{font-weight:800;margin-bottom:4px}
.tfmb-desc{color:#444;font-size:13px;line-height:1.35;margin-bottom:8px}
.tfmb-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.tfmb-tag{display:inline-block;font-size:11px;padding:4px 8px;border-radius:999px;background:rgba(0,0,0,.06)}
.tfmb-download{display:inline-block;text-decoration:none;font-weight:700;border-radius:999px;padding:7px 10px;border:1px solid rgba(0,0,0,.15);color:#111}
.tfmb-download:hover{background:rgba(0,0,0,.04)}
.tfmb-usage{font-size:12px;color:#666;border-top:1px solid rgba(0,0,0,.08);padding-top:8px;margin-top:8px}
.tfmb-pagination{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.tfmb-page{display:inline-block;text-decoration:none;padding:7px 10px;border-radius:10px;border:1px solid rgba(0,0,0,.12);color:#111}
.tfmb-page.is-current{background:rgba(0,0,0,.07);font-weight:800}
.tfmb-empty{border:1px dashed rgba(0,0,0,.2);border-radius:16px;padding:18px;background:rgba(0,0,0,.02)}
.tfmb-notice{border:1px solid rgba(0,0,0,.1);border-radius:14px;padding:14px;background:rgba(255,255,255,.9)}

.tfmb-actions{display:flex;align-items:center;gap:8px}
.tfmb-preview-btn{border:1px solid rgba(0,0,0,.15);background:#fff;color:#111;border-radius:999px;padding:7px 10px;font-weight:700;cursor:pointer}
.tfmb-preview-btn:hover{background:rgba(0,0,0,.04)}
.tfmb-open-preview{cursor:pointer}

/* Modal */
.tfmb-modal{position:fixed;inset:0;z-index:99999;display:none}
.tfmb-modal.is-open{display:block}
.tfmb-modal__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55)}
.tfmb-modal__dialog{position:relative;max-width:980px;margin:6vh auto 0 auto;background:#fff;border-radius:18px;box-shadow:0 25px 80px rgba(0,0,0,.35);overflow:hidden}
@media(max-width:1020px){.tfmb-modal__dialog{margin:4vh 14px 0 14px}}
.tfmb-modal__close{position:absolute;top:10px;right:12px;border:0;background:rgba(0,0,0,.06);width:40px;height:40px;border-radius:999px;cursor:pointer;font-size:26px;line-height:40px}
.tfmb-modal__body{display:grid;grid-template-columns:1.2fr 1fr;gap:0}
@media(max-width:850px){.tfmb-modal__body{grid-template-columns:1fr}}
.tfmb-modal__imageWrap{background:rgba(0,0,0,.03);display:flex;align-items:center;justify-content:center;min-height:320px}
.tfmb-modal__image{width:100%;height:auto;max-height:72vh;object-fit:contain;display:block}
.tfmb-modal__content{padding:18px}
.tfmb-modal__titleRow{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.tfmb-modal__title{font-size:20px;font-weight:800}
.tfmb-modal__desc{color:#333;line-height:1.45;margin-bottom:12px}
.tfmb-modal__usage{font-size:13px;color:#555;border:1px solid rgba(0,0,0,.08);background:rgba(0,0,0,.02);border-radius:12px;padding:10px;margin-bottom:14px}
.tfmb-modal__ctaRow{display:flex;gap:10px;align-items:center}

.tfmb-play{position:absolute;inset:auto 10px 10px auto;background:rgba(0,0,0,.65);color:#fff;border-radius:999px;padding:8px 10px;font-weight:800;font-size:12px}
.tfmb-thumb{position:relative}
.tfmb-modal__video{width:100%;max-height:72vh;background:#000;display:block}

.tfmb-auth__dialog{position:relative;max-width:520px;margin:18vh auto 0 auto;background:#fff;border-radius:18px;box-shadow:0 25px 80px rgba(0,0,0,.35);overflow:hidden;padding:18px}
@media(max-width:640px){.tfmb-auth__dialog{margin:14vh 14px 0 14px}}
.tfmb-auth__title{font-size:20px;font-weight:800;margin-bottom:8px}
.tfmb-auth__text{color:#444;line-height:1.45;margin-bottom:14px}
.tfmb-auth__actions{display:flex;gap:10px;flex-wrap:wrap}
.tfmb-auth__primary{display:inline-block;padding:10px 14px;border-radius:12px;background:#111;color:#fff;text-decoration:none;font-weight:800}
.tfmb-auth__secondary{display:inline-block;padding:10px 14px;border-radius:12px;border:1px solid rgba(0,0,0,.18);color:#111;text-decoration:none;font-weight:800}
.tfmb-auth__note{margin-top:10px;color:#666;font-size:13px}
