/* Restore the compact native category sheet and keep the existing tree links. */
@media(max-width:767px){
 html.sm-mobile-ux #sd-category-dialog[open]{width:420px;max-width:calc(100vw - 24px);height:fit-content;max-height:80vh;max-height:80dvh;margin:auto;padding:16px 14px;border:1px solid #dce8e2;border-radius:20px;box-shadow:0 16px 48px #0002;overflow:hidden}
 html.sm-mobile-ux #sd-category-dialog h2{font-size:17px;line-height:1.8;margin:0 0 12px;padding-inline-end:40px}
 html.sm-mobile-ux #sd-category-dialog .sd-close{top:10px;left:10px;width:36px;height:36px}
 html.sm-mobile-ux #sd-category-links{padding:0 0 8px;flex:0 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}
 html.sm-mobile-ux #sd-category-links .sd-cat-search{font-size:12px;line-height:1.7;margin:0 0 8px;padding:2px 0 7px}
 html.sm-mobile-ux #sd-category-links .sd-cat-search input{height:44px;min-height:44px;margin-top:5px;padding:8px 10px;font-size:13px}
 html.sm-mobile-ux #sd-category-links .sd-cat-node{margin:5px 0}
 html.sm-mobile-ux #sd-category-links .sd-cat-node>summary{min-height:44px;padding:9px 11px;font-size:13px;line-height:1.8;border:0;border-radius:10px;background:#e1f6f3}
 html.sm-mobile-ux #sd-category-links .sd-cat-node>summary:after{font-size:17px}
 html.sm-mobile-ux #sd-category-links .sd-cat-node .sd-cat-node>summary{font-size:12px;font-weight:400;background:#f2fefc}
 html.sm-mobile-ux #sd-category-links .sd-cat-children{margin:6px 6px 8px 0;padding:3px 8px 3px 0}
 html.sm-mobile-ux #sd-category-links a{min-height:40px;padding:8px 5px;font-size:12px;line-height:1.8}
}
.sm-ux-spinner{display:inline-block;flex:none;width:22px;height:22px;border:2px solid #c8e7e3;border-top-color:#016d67;border-radius:50%;animation:sm-ux-spin .75s linear infinite}
.sm-search-pending{display:flex;align-items:center;justify-content:center;gap:10px;padding:18px 12px;color:#014a46;font-family:Vazir,Tahoma,sans-serif;font-size:14px;line-height:1.8}
.sm-search-skeleton{display:grid;gap:9px;padding:0 12px 14px}
.sm-search-skeleton>span{height:44px;border-radius:10px;background:linear-gradient(110deg,#f2f7f6 8%,#e4efed 18%,#f2f7f6 33%);background-size:220% 100%;animation:sm-ux-shimmer 1.3s linear infinite}
.sm-search-retry{display:block;min-height:44px;margin:0 auto 12px;border:1px solid #b7d8d3;border-radius:9px;padding:8px 18px;font:inherit;background:#f2fefc;color:#016d67;cursor:pointer}
.sm-search-progress{position:fixed;inset:0;display:grid;place-items:center;z-index:2147483000;background:#ffffffe0;padding:20px;direction:rtl;font-family:Vazir,Tahoma,sans-serif;pointer-events:none}
.sm-search-progress[hidden],.sm-navigation-progress[hidden]{display:none!important}
.sm-search-progress-card{display:flex;flex-direction:column;align-items:center;gap:14px;width:min(310px,100%);padding:25px 20px 18px;background:#fff;border:1px solid #dce8e2;border-radius:18px;box-shadow:0 8px 36px #014a461a;color:#014a46;text-align:center;pointer-events:auto}
.sm-search-progress-card .sm-ux-spinner{width:34px;height:34px;border-width:3px}
.sm-search-progress-card p{margin:0;font-size:15px;line-height:1.9}
.sm-search-progress-card button{min-height:44px;border:0;background:#f0f9f7;color:#016d67;border-radius:9px;padding:9px 20px;font:inherit;font-size:13px;cursor:pointer}
.sm-search-submit-error{font-family:Vazir,Tahoma,sans-serif;line-height:1.9;color:#8e2929;font-size:13px;padding:10px}
.sm-navigation-progress{position:fixed;top:max(10px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:2147482999;display:flex;align-items:center;gap:9px;max-width:calc(100vw - 24px);padding:10px 16px;border:1px solid #c8e3d8;border-radius:12px;background:#fffffff2;color:#014a46;box-shadow:0 4px 18px #014a4615;direction:rtl;font:13px Vazir,Tahoma,sans-serif;pointer-events:none}
@keyframes sm-ux-spin{to{transform:rotate(360deg)}}
@keyframes sm-ux-shimmer{to{background-position:-220% 0}}
@media(prefers-reduced-motion:reduce){.sm-ux-spinner,.sm-search-skeleton>span{animation:none}}
